check whether a number belongs to an array