Ok, villagers are scared of zombies. And when they’re near, they run fast away from the zombie.
So if the villager can only run towards the farm, the zombie (with a helmet for sun protection) will chase the villager to the farm, then lead the zombie back to the village.