indexOf would have to be looping an array of true/false values which it isn’t.
If you really wanted that you can create an array of the values that the callback returns and then use indexOf on that array. You would then use the index indexOf returns to index into the array passed to the function. Not sure if that made any sense, it is kind of hard to explain.
This is pretty much what solution 3 on the hints page does. I do however find that approach hard to reason about, at least at first glance.