An idea for encoding random access memory in structured computation as in STARK arithmetization, or more general algebraic automata.
If you look at the memory access design in MidenVM, then you notice that they have this interesting constraint of needing memory accesses to have increasing addresses.
This is thus more like "linear access memory" than "random access memory".
There are two interesting aspects of their approach though:
The log approach for memory allows relatively straight forward compilation to circuits:
For 3., you can efficiently encode a permutation of a log of size with gates, using a routing network, so this can be done efficiently.
But this yields a circuit, which may not have the structured format we need for, e.g. STARKs.
To get around this, we encode the computations in step 2. and 3. with instructions for a VM, like with the MidenVM approach.
Linking this with step 1. is tricky though. Basically, we need to make sure that the time-sorted log we work with in the checking step is the same as was referenced in the "normal" computation.
One way to do this is for the normal computation to hash each entry in the log as it uses them.
Then you also compute this hash when checking log integrity after sorting.
To summarize, here's an approach for supporting random access memory in STARK-like automaton encodings of computation:
Checking that permutation in a small amount of space is tricky, but most likely doable given the ability to reference a private input by index in your bytecode.