Implemented "is in array" function