Finds the position of a target value within a sorted array by repeatedly dividing the search interval in half.