Problem Statement
Given a sorted array and a target value, write a function to find the index where the target should be inserted using binary search. If the target is found in the array, return its index. Otherwise, return the index where it would be if it were inserted in order.
Sample Test Case