This seems like it would be simple, but it involves alteration to patching logic so it might be more complex.
A vile force of darkness encroaches on the fortress. Goblins stream in from every direction, looking for warm blood to spill. An alert is sounded to call all dwarves behind the fortress defenses, but it will be too late for some. Still, herbalists and fisherdwarves do their very best to escape into safety, and some make it inside. The stragglers are quickly caught and surrounded, their messy deaths serving to buy a little more time for those ahead of them.
An herbalist arrives at the outer defenses, just a few tiles from the killing field of a courtyard where marksdwarves sit behind fortifications to pepper the enemy with bolts. Goblins are hot on her heels, and one manages to run alongside her and attack! A tense moment as she dodges aside and runs...
...back away from the fortress and toward the goblin army, where she's surrounded and torn limb from limb. This is a tragic story, and we've all seen it's like.
But I think this could be avoidable.
Basically, I want to be able to designate a zone like you can designate a meeting hall, but instead of being a place for dwarves to hang out in when they aren't working, it's a place for them to flee to when they are in danger.
Essentially when a dwarf is attacked and choses to flee, they should attempt to path toward the refuge zone. They might get cut off again, and certainly won't be guaranteed to make it, but it vastly increases their chances of getting away from an attacker and luring them into the waiting hammers of your military.