Index of array entry?

Hi all, is it possible to determine the index of a particular entry in a 1 dimensional array (i.e. a list)? E.g if I had an array A=[3,2,8,22,1], is there a function that would give the index of a chosen entry, maybe something like A.index(2)=1?
Many thanks!

not to day , because it is a too long O(n)) where n is the size of the array.