arraydata: initial structure

Other classes that require external memory should allocate it though
ArrayData. This will automatically handle pooling and cleanup.