So far, I have been storing the array in a vector and then looping through the vector to find the matching element and then returning the index.

Is there a faster way to do this in C++? The STL structure I use to store the array doesn't really matter to me (it doesn't have to be a vector). My array is also unique (no repeating elements) and ordered (e.g. a list of dates going forward in time).