arraydata: initial structure

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

To simplify allocations Buffers will now make a single call to
ArrayData.