Refactor binary search

I realised a huge portion of the method was redundant. If the number of values in the array is even, it will simply split up unevenly (one side has even number, the other side has odd number).
Add more assertions and refactor
Fix: unable to handle array with 1 value