Array with insert and delete

I would suggest not viewing this as an array data modeling problem, but just that you need a user-specified sort order, and the ability to randomly insert/delete elements and maintain your sorted order. This problem now becomes roughly isomorphic to How to model a Leaderboard

Similarly to what George proposed, I think one can go a step further and rely on the infinite number of things that are lexicographically between any two values. For example, if you have two elements at “index” X and Y, XM lexicographically sorts between X and Y, with a bit of randomness in choosing the in-between point and taking advantage of the full 256 values in a byte, you could still achieve reasonably conflict-free inserts/deletes. You would then need to maintain an index of the number of elements under any given prefix to make seeking a particular index faster.

Do be aware that “Insert X as the 100th element” is going to be an inherently conflict-prone operation, as you must also ensure that no other element was inserted or deleted between 0 and 99, otherwise you’d be inserting at a now-incorrect place. However you’re finding the 100th indexed location will likely leave enough conflict ranges in your transaction to enforce this, but minor changes in how you specify your exact contract of insert/delete will have a large impact on how concurrent this datastructure will be.