To search for an element in the array using linear search method