performance update for arrayIndexOf predicate

call the predicate against the item 1 time vs every time.