getNextPosition function

Find the first value in an array that is larger than the specified value.