Use indexOf to find if an element is in an array