If the array is sorted you could use a binary search technique which could speed things up enormously. Otherwise you need to check them all.

As for size... I'd worry more about running out of RAM than exhausting the limits (probably about 32bit signed, so 2gb strings and 2 billion (ish) array entries).