Allocate an N dimensional array that can be dereferenced to a flat array and can be freed in one call.