performPermutation: Transform array with orthogonal permutation matrix
Description
Given an orthogonal permutation matrix $T$, an array of
dimensions and a one-dimensional representation of data. It will return a
transformed array with the transformed dimensions.