My question is, how are arrays implemented in Erlang, as opposed to lists.
With immutable types doing things like,
move ([X | Xs], Ys) ->
[X
You can find the source code here. It looks like, as @rvirding mentioned, that an array is a functional tree. I haven't studied the implementation deeply--and there's no reference in the source to the data-structure's origin--but a quick skim suggests a lookup worst-case is some logarithmic factor of N.
I'd love a correction if someone else is more familiar with this source / has a moment to study it.