Compared to the `xgrid.search_1D_array` method, the `_search_time_index` method is much more complex; perhaps we can simplify it?