Have a character move right and left after turning a corner with a lane system?

hey… how can I create this Lanes System? From the begining