I just bumped on to this question today and was trying for a solution that is better than O(N) but could not come up with one.
Searched through SO but couldn\'t find
You're right, the fastest way is to simply iterate through the array and look for it. Without further information, there is nothing better you can do.
Unless you have a quantum computer, that is.