You can use "Skirmish mode" off (they so they won't move when the enemy is close).

Turning on "Fire-At-Will" will make them shoot any unit when they get in range(in my observation, the ones closest and most numerous). I personally won't recommend this, since they would shoot indescriminately ( but that answers the question).

Reason being you want to be precise using archers, shooting at the correct unit and minimizing friendly fire.

"Hold" makes them stay put and hold their ground (unless you order them to move).

I'm not sure what you mean by flanking. But when I want to change face I just right-click (hold) and drag, then let go ( a pink ghost of the final position of your unit will appear. I also press the hotkey so they move faster.