Add findIndex method

Added findIndex method, which returns the index of the first element to pass a truth test.