Merging range indexes for faster subarray linear indexing

This only helps when the indexes are commensurate, but when that's true it's a huge benefit