Assuming order matters, your algorithm is O(N) worst case. If values tend to be different for different states, the test will generally fail very early while comparing elements of two candidates. If the data were completely random, the performance to compare two states to each other would approach O(1)... the very first array elements would differ most of the time, odds of first two being identical would be much smaller, etc. If you know something about the structure of the data in the array (e.g. maybe most likely to differ at the end?) you can exploit that. Of course of the array lengths can be different, check that before anything else.
If the array is not going to change after initialization, you can precalculate a hash of the array elements. However, unless my first statement does not apply (you will generally get far into the array before detecting a difference), a hash may not be the best option.