I've known of few things passing through sealed fortification-boxes: flying objects, liquids, and your dwarves climbing out. Enemies will not get in by them.
For a bunker that can be shot out of but can't be fired upon, you could use fast-toggling doors to briefly give your archers line of sight and then closing the door on enemy return fire, if there's any. However, this bears a substantial FPS cost - I recall one case of FPS going from 40 to 30 with just three flashing doors.
Other options have been to give the enemy archers a different, closer target, and to have enemies pass beneath your archers so that they're firing at their backs and if any elite archers pop up they're the closest rather than most distant enemy (behind a meat wall).
That said, if you're worried about breaches, you could fail-safe or layer your defences - only a pathetic thief will not be at least slowed down if not stopped entirely by locked door or hatch, which allows you time to pull the lever or whatnot.
For enemies hiding under your overhang, with archers one dual-purpose solution would be to have outlying archery towers accessed only by underground routes.
'course, if you're open to using various traps, could escalate up to "who needs to send out any defenders anyway" with that. For defending a pass or small areas, they're generally superior to military. Raising brides, water, magma, regular trap buildings, minecart grinders/bouncers/shotguns, encasing, previous enemies, even weather....Lots of ways to not risk your dwarves.
Military role is more large-area defence and counter-surprise, as well as giving best cross-training. Archers in specific excel against flying, glass cannon and unarmoured targets.
As for armour, if I'm, say, emergency-drafting a miner who was military migrant against giant dingo pack, I'd rather have them not wear even clothes than give them metal armour to arrive too late, and maybe even pass out in from exhaustion and get their skull punched in. A shield, a weapon capable of piercing enemy defences and defensive skills superior to enemy offensive skills go 95%+ of the way.
Though as far as metal armour goes, I do upgrade straight to single-layer steel from perhaps leather/bone as (cross)training/"clothes"...Because well, why not if they have the skill to wear it? Steel's easy enough to make if you have the resources.