Add function that checks if an array contains an element