Expansion of register arrays

TODO