I was wondering if there is any data structure for supporting editing elements, querying elements, and sorting sub-arrays, faster than the naive implementation. I thought I remembered hearing something about this, but can't find any resources so maybe i just made the idea it's possible up.