A simple approach is to first carry out a ($x$-dependent) unitary transformation of $A(x)$, such that all diagonal elements are zero. (This is always possible, see for example https://math.stackexchange.com/q/267192/87355 ) Then, you take $$B=\begin{pmatrix} 1&0&0\\ 0&2&0\\ 0&0&3 \end{pmatrix},\;\; C_{ij}(x)=\begin{cases} 0&\text{if}\;i=j\\ \frac{A_{ij}(x)}{B_{ii}-B_{jj}}&\text{if}\;\;i\neq j. \end{cases} $$