toCollection

fun <T, D : Dimension, C : MutableCollection<in T>> MultiArray<T, D>.toCollection(destination: C): C

Appends all elements to the given destination collection.