Hopefully I have the right idea?
Let $A\in\mathbb{C}^{4\times 4}$ be a diagonal matrix with exactly 3 distinct entries on its main diagonal.
What is the dimension of the vector space over $\mathbb{C}$ of matrices $B\in\mathbb{C}^{4\times4}$ such that $AB=BA$? If $B\in\mathbb{C}^{4\times4}$ is a diagonal matrix with exactly 3 distinct entries on its main diagonal, is $B$ similar to a polynomial in $A$?
Another way to formulate this is to let $T_A\colon\mathbb{C}^4\to\mathbb{C}^4$ via $T_A(B) = AB-BA,$ and we wish to find the dimension of the null space $N$ of $T_A.$
For example, let's say
$$A = \left[\begin{array}{cc|cc} a&&&\\ &a&&\\ \hline &&b&\\ &&&c \end{array}\right].$$
Then we need $B$ to commute with each $2\times 2$ block. In the upper left block, we have a scalar multiple of the identity, so everything commutes and this has dimension $4$. For the lower right block, we need $B$ to be diagonal there (dimension $2$). So then $\dim N = 6.$
As for the second question, I feel like the answer is no, but I am struggling to come up with a counterexample.