Updated map functor to use binary search over the sorted array. Allow user to indicate input array was presorted so it should be treated as such.