A man who was allegedly driving a car erratically through Perth with two children in the back has been arrested after a pedestrian was hit and killed.