`findIndex' implementation