The arrest of Timothy Thomas, 17, “most likely prevented a tragedy and saved multiple lives,” the police chief said.