Six people were killed in a random shooting in the city’s main square, and three bodies were later found at the home of the attacker.