Re-implemented array types to use internal arrays, while doin many of th...

I'd like to merge this update, but only after review.