Turn ArrayData into a Managed object

Memory manage ArrayData. Once the ArrayData is moved
to be inline inside the object, this will save quite
some time for allocating and freeing arrays.

Change-Id: I19a520161d41bfe3d83f377af0b41db4ac5b99e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>