Returns the index of a missing integer in an array