The Ansewer is very simple:
First, give townsfolk the Wander Ability
Second, create a region that covers all your town. Lets call it "TownsfolkRange"
Then create the trigger:
Events:
Unit - A unit leaves TownsfolkRange
Conditions:
Unit type of leaving unit is equal to Peasant
Actions:
Unit - Order Leaving Unit to move to random point of TownsfolkRange