Finding first position of a target in a sorted array with duplicates. Helps solve the leetcode problem: Find First and Last Position of Element in Sorted Array