arraydata: initial structure

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