find an element in array using linear search