Well you're in luck because what you did actually work with diagonal matrices. Let's look at an example :
Let $A = \begin{bmatrix}
a & 0 \\
0 & b \\
\end{bmatrix}$ be a diagonal matrix then $ A^{2}=
\begin{bmatrix}
a & 0 \\
0 & b \\
\end{bmatrix}
\begin{bmatrix}
a & 0 \\
0 & b \\
\end{bmatrix} = \begin{bmatrix}
a^2& 0 \\
0 & b^2 \\
\end{bmatrix}$ and more generally :
$$A^n = \begin{bmatrix}
a^n & 0 \\
0 & b^n \\
\end{bmatrix}$$
So you guess wasn't wrong at all, it's just that when you have a diagonal matrix, raising it to a power $n$ equals to raising each of it's coefficients to the power $n$.
But keep in mind that this only works for diagonal matrices. If you have a matrix $B$ that is not diagonal, the best way to find $B^n$ is to diagonalize it (if possible), raise it's coefficients to the power $n$ and go back to your first basis.