What class of matrices permutes matrix entries? Let's start with the $2$ by $ 2$ case:
We're given a matrix A
$$\begin{pmatrix}
a & b \\
c & d.
\end{pmatrix}$$
What class of matrices "rotates" or "permutes" the entries upon left-multiplication, such that we obtain, for example,
$$BA = \\
B\begin{pmatrix}
a & b \\
c & d
\end{pmatrix} = \begin{pmatrix}
b & c \\
d & a
\end{pmatrix}?
$$
As another example, let's consider a $3$ by $3$
\begin{pmatrix}
a & b & c \\
d & e & f \\
g & h & i \\
\end{pmatrix}. What matrix $B$ would permute these entries, such as, for instance, into
\begin{pmatrix}
d & e & a \\
c & h & i \\
f & g & b \\
\end{pmatrix}.
Does there exist a general class of matrices that permutes the entries of an $n$ by $n$ matrix to any desired result?
 A: It's very easy to see that such matrices don't always exists.
For example, there's no matrix $B$ such that $$B\begin{pmatrix}1&0\\0&0\end{pmatrix} = \begin{pmatrix}0&0\\0&1\end{pmatrix}$$
To see why, just write the entries of $B$ and calculate the product on the LHS.
A: Permutations of $n^2$ elements can best be described by elements of the symmetric group of order $n^2$, written $S_{n^2}$. You are asking now how these permutations act on matrices. We could also ask more generally how these permutations act on elements of any vectorspace (matrices are, after all, also elements of the vector space $\mathbb{R}^{n^2}$).
It turns out that there is a whole theory behind this, called representation theory. A representation is a function $\rho$ (more precisely a group homomorphism) from a group $G$ to the invertible linear operators over a vector space $V$, i.e.: $\rho: G \rightarrow \operatorname{GL}(V)$. The objects in $\operatorname{GL}(V)$ can be described (in the finite dimensional case) as matrices. So $\rho$ associates a matrix to every group element.
In your case the group is $S_{n^2}$ and we wish to act with it on the vector space of $n \times n$ matrices, this corresponds to a representation $\rho: S_{n^2} \rightarrow \operatorname{GL}(\mathbb{R}^{n^2})$. If we let $\sigma \in S_{n^2}$ be a permutation we would expect something like this to happen:
$$
\rho(\sigma) \begin{pmatrix} a_{1} & a_{2} & \dots \\ a_{n+1} & a_{n+2} \dots \\ & \dots & \\ a_{(n-1)n} & a_{(n-1)n +1} & \dots  \end{pmatrix}= \begin{pmatrix} a_{\sigma^{-1}(1)} & a_{\sigma^{-1}(1)} & \dots \\ a_{\sigma^{-1}(n+1)} & a_{\sigma^{-1}(n+2)} \dots \\ & \dots & \\ a_{\sigma^{-1}((n-1)n)} & a_{\sigma^{-1}((n-1)n +1)} & \dots  \end{pmatrix}
$$
(We have to put $\sigma^{-1}$ there for $\rho$ to be a homomorphism, but this doesn‘t matter).
The matrix you were looking for is therefore exactly $\rho(\sigma)$, $\rho$ is in this case called the standart representation of $S_{n^2}$, and a well understood function. You can now go further and ask interesting questions like „Are there subspaces in the vector space $\mathbb{R}^{n^2}$, that are left invariant by all possible permutations?“, this is exactly what representation theory deals with.
I now this is a very theoretical answer that doesn’t tell you how the $\rho(\sigma)$ look like, but I hope that this could still show you how much fascinating theory there is behind your question:)
Edit:
The $\rho(\sigma)$ are exactly the permutation matrices linked to in the comment under your post. Notice though that we consider the matrices upon which is acted here as elements of a vector space and represent them therefore as vectors, so the permutation matrices/ the $\rho(\sigma)$ don’t act on the matrices by matrix multiplication but by „matrix vector multiplication“, i.e. you have to write the matrix that $\rho(\sigma)$ acts on as a column vector.
A: Concerning your $2 \times 2$ example : it is impossible that a (fixed) matrix $B$ exist such that for any $A$, we have this "scrambled" result:
$$
B\underbrace{\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}}_A = \begin{pmatrix}
b & c \\
d & a
\end{pmatrix}$$
for a simple reason: if we take the determinants on both sides, we should have:
$$\det(B)(ad-bc)=ab-cd \ \iff \ \det(B)=\frac{ab-cd}{ad-bc}$$
with a fixed value on the left and a variable value on the right, which is impossible.
Same comment for your second $3 \times 3$ example.
I think (it remains to be proven) that the only "possible scrambling operators" $B$ of the entries of a matrix by left-multiplication are those where $B$ is permutation matrix (a single entry $1$ on each row and each column) ; in such a case, one obtains the permutation of the lines of the matrix $A$ like here :
$$\underbrace{\begin{pmatrix}
1 & 0 & 0 \\
0 & 0 & 1 \\
0 & 1 & 0
\end{pmatrix}}_B\begin{pmatrix}
a & b & c \\
d & e & f \\
g & h & i
\end{pmatrix}=\begin{pmatrix}
a & b & c \\
g & h & i \\
d & e & f
\end{pmatrix},$$
where the fact that $B(e_1)=e_1, B(e_2)=e_3, B(e_3)=e_2$ make $B$ "act" on the rows of matrix $A$ in the following way: a "stand-still" for the first row and and a transposition of the 2nd and third row.
Remark: post(=right)multiplication by this matrix $B$ gives a similar action on columns of $A$.
