An 18-year-old man armed with at least three guns roamed through a northwestern New Mexico community firing randomly at cars and houses on Monday, killing three people and injuring six others including two police officers before he was killed, authorities said.