Started to restructure the code to use a "struct ambit_dense_array" to handle and exchange arrays in a convenient way.