Given a set of $S$ of $ n\times n$ Hermitian matrices with entries in $\mathbb{C}$, the set of all $n\times n$ unitary matrices that commute with $S$ forms a Lie group $G$. My question is what Lie groups can we get from this process by choice of $n$ and $S$? We can get any products of unitary groups of the form $U(p)\times U(q)\times U(r)...$ by taking S to be a matrix with $p$ eigenvalues equal to $0$, $q$ eigenvalues equal to $1$ and $r$ eigenvalues equal to $2$ and so on. Is that the only possibility? Or can I get a group isomorphic to $U(1)\times Sp(m)$ or something? (We're always going to have a factor of $U(1)$ since the identity matrix commutes with everything. Like literally everything.) I can think of neither a counterexample nor a proof.
If I can get other Lie groups than the natural follow up questions would be: What Lie groups can I get? Is there a nice construction get a set $S$ given a Lie group $G$? What representations of $G$ can I get?