You are given a list of integers 'arr' sorted in non-decreasing order and an integer 'target'. Implement a function binary_search_closest(arr, target) that returns an index into 'arr'.
If 'target' appears in 'arr', return the index where it is found. If 'target' does not appear, return the index of the element whose value is closest to 'target'. If two elements are equally close, return the index of the element with the smaller value. If 'arr' is empty, return -1.
Your function must run in O(log n) time.