Find min in sorted array with duplicates