A headmaster was arrested Wednesday as the key suspect in a shooting spree that shocked Thailand, police said, after a manhunt for the masked gunman who killed three people including a toddler in an armed robbery.