Most monsters here will target the attacker with the lowest AC. Very few do not do this.
Archers are typically fairly low on AC since they can neither benefit from parry AC or shields. Thus, archers need to be completely blocked off by the characters engaged with the enemy.
I found that Archer PCs are best used for counter-archery. NPC archers won't rush after you, and you can generally outshoot them 1 on 1. Doesn't matter what class you are. Other than that, they can be alright at shooting enemies who are running away, but beware if you do not kill it, it might come back and mess your day up if you don't have an escape or a way to fight back in melee. For this reason, archery is typically a something melee characters will sometimes do instead of chasing enemies off. Early on, my archer learned the hard way not to shoot at things she couldn't survive a fight with.
If you completely block off a doorway or other chokepoint, you can have an archer shooting without pulling enemies through your guys. Just don't close the door. It will throw players around. NPCs shouldn't be able to shove players out of the way, but they will run past if there is room.