Linearly search for an element in a possibly empty array and return the index of its first appearance. Require that the input array contains the element. Ensure the returned index is the first appearance of the element.