rotate, transform and transpose arrays of arbitrary data