fn vec_index_write_impl