Stun, Daze and similar stuff don't impede your movement...
...they make your mind funny.
While you are stunned, there's nothing holding your body to move. You just can't think right to actually do something. If you take a really hard blow to your head, that won't make your body harder to move - it will make your brain go gonzo for a few secs, before you became aware of what's really happening.
Stun is not about movement, is about senses of what's going on.
Freedom of Movement makes "your body work right", not anything else. It allows you to move, but not allows you to think. You can't think if you're dead. Or Stunned.
Paralysis don't block purely mental actions, so it don't block "thinking".
Slow makes your body... well, slower, but it doesn't affect your thinking.
Web is... well, a web. It hinders your body, not your mind.
Stun, Daze, Dazzle and similar stuff, on the other hand, makes your senses go wacko, so they aren't really blocking your movement. Stun never stopped you from moving, it just stopped you from thinking for a while - and since you don't think, you don't act.
So, the point is,
If something affect your senses, Freedom of Movement can't help you.
Think like a "Houdini Effect". Houdini can escape from almost anything, considering that he
knows what's going on. If you throw him with a concussion inside a closed coffin... well... he will stay there.
So, to determine what Freedom of Movement removes or not, use a simple rule:
Why I can't move?
If you can't move because a spell or something is hindering your body to move, like Web, Freedom of Movement can help you.
If you can't move because a spell or something is making your brain go gonzo, like Stun, or because your body becomes something that can't normally move, like stone from Flesh to Stone*, it won't help you.
*Flesh to Stone don't impede your movement, it merely limits you to the movement that a stone statue is allowed to do. A "Freedom of Movement"-ed and "Web"-ed person would become a completely untangled stone statue.
Also, read Freedom, the 9th level spell:
The subject is freed from spells and effects that restrict its movement, including binding, entangle, grappling, imprisonment, maze, paralysis, petrification, pinning, sleep, slow, stunning, temporal stasis, and web. To free a creature from imprisonment or maze, you must know its name and background, and you must cast this spell at the spot where it was entombed or banished into the maze.
Emphasis mine.
Freedom removes a bunch of effects, like Flesh to Stone and Stun. It would seem rather... strange to say that a way lower-level spell can do almost all the things that a 9th level spell can. Freedom is Freedom, not Freedom of Movement.
Best Answer
Starting an encounter is never spelled out explicitly nor are there any concrete examples I'm aware of. However, you can piece together rules on Hide/Spot, Move Silently/Listen, Stealth and Detection in a [environment], Surprise and How Combat Works to come up with a method something like:
First, determine if anyone is hiding. If no one is hiding, you can skip to step 3 of How Combat Works when line of sight is obtained.
Determine if Spot or Listen is possible and if so at what distance based on environment. Walls or obstructions may prevent Spot and hinder Listen, while the absence of cover or concealment prevents Hide.
Roll Hide/Spot Move/Listen for everyone involved and add modifiers for distance. Technically, you could roll this over and over until someone is aware or you could just modify the distance until at least someone is aware based on one set of rolls, provided at least one side is closing.
If at least one creature is aware from each side, and at least one creature is unaware, a surprise round ensues. Until then, aware creatures can act freely, or start the surprise round by attacking.
Freely, with the caveat that anything that alerts the other side is going to change the underlying premise; that only one side is aware, thus a surprise round ensues. If you roll initiative while only one side is aware, that's OK, but you're going to have the possibility of multiple surprise rounds, which may be awkward.
The three previous paragraphs are implicitly mentioned in step 2 of how combat works.
If the environment is a dungeon, due to additional Listen modifiers from walls and doors and the inability to Spot due to lack of line of sight, encounter distances are typically closer than outdoors and generally creatures will hear before they see enemies. Outdoors, encounters can start much further, depending on the terrain. If there is no cover or concealment, or no one hears anyone else, then once line of sight is obtained, you can just skip to step 3.
The direction the party is moving is up to the party, and the direction of the enemy up to the DM (you).
Spot and Listen does not determine distance, rather, a roll based on environment (or better, your judgement based on terrain features or lack thereof) determines the maximum distance at which two opposing groups have a chance of spotting a hidden opponent (Spot/Hide). Beyond this, the groups can't see each other. If neither group see each other at the maximum distance and at least one group is closing distance, the distance modifiers will change as they move and eventually someone will see an enemy.