What is the idiomatic way to manipulate tensors during the pass itself?

What C++ classes/functionalities should I use if I have a multi-dimensional array that I want to transform during a pass? I am looking for things similar to the toolset of Numpy.

More concretely, I have some operation attributes that represent tensors. In C++ these tensors end up as an array+shape. I want to perform on them operations like moveaxis.