There doesn't seem to be any reason `prepare_index_arrays` is in a pyx, except that it's relevant to other functions there. Should it be with the other indexing utils in `sputils`?

Perhaps `prepare_index_for_memoryview` is more explicit in suggesting why these flag checks are needed.