Homes, businesses and cars have been attacked and 32 police officers injured during violence in Ballymena and several other areas in Northern Ireland.