Move arrays from stack to heap.