An 18-year-old was arrested after allegedly intending to carry out a terror attack using knives and hammers on New Year's Eve.