A 63-year-old man has been arrested after allegedly opening fire on police officers and homes during an incident in New South Wales’ north.