Faster array traversals for findIndex