Trivialization of the vector bundle of centralizers of regular elements Let $\mathfrak{g}$ be a complex semisimple Lie algebra of rank $r$. Let $\mathfrak{g}^{\mathrm{reg}}$ be the set of $X\in\mathfrak{g}$ whose centralizer $Z_{\mathfrak{g}}(X):=\{Y\in\mathfrak{g}:[X,Y]=0\}$ has dimension $r$ (called the set of regular elements here).

Question. Can we find polynomial maps
  $$f_1,\ldots,f_r:\mathfrak{g}\to\mathfrak{g}$$
  such that for all $X\in\mathfrak{g}^{\mathrm{reg}}$, $\{f_1(X),\ldots,f_r(X)\}$ is a basis for $Z_{\mathfrak{g}}(X)$?

The answer is trivially yes for $\mathfrak{g}=\mathfrak{sl}(2,\mathbb{C})$. Simply take $f_1:\mathfrak{sl}(2,\mathbb{C})\to\mathfrak{sl}(2,\mathbb{C})$ to be the identity map.
Using Mathematica, I also found two such polynomials $f_1,f_2$ for $\mathfrak{g}=\mathfrak{sl}(3,\mathbb{C})$, but they are a bit too messy to write down here.

Edit. In other words, if we let
$$E=\{(X,Y)\in\mathfrak{g}^{\mathrm{reg}}\times\mathfrak{g}:[X,Y]=0\}$$
then $E$ is a vector bundle of rank $r$ over $\mathfrak{g}^{\mathrm{reg}}$ and the question is if it is trivial in the algebraic category.
 A: The answer is 'yes', and it follows from Theorem 0.1 in B. Kostant, "Lie group representations on polynomial rings" (American Journal of Mathematics, 85 (1963), 327–404).  Here is the argument/construction:
Let $\phi_1,\ldots,\phi_r$ be generators of the ring of ad-invariant polynomial functions on $\frak{g}$.  (We can assume that $\phi_1(X)=\tfrac12\langle X,X \rangle$, where $\langle, \rangle$ is the Killing form on $\frak{g}$, and we can assume that $\phi_i$ is homogeneous of degree $m_i+1$ where $1=m_1\le m_2\cdots\le m_r$ are the exponents of $\frak{g}$.  By Kostant's Theorem 0.1 quoted above, the differentials
$$
\mathrm{d}\phi_1,\ldots, \mathrm{d}\phi_r
$$
are linearly independent at each point $X\in\frak{g}^{\mathrm{reg}}$.  
Define a polynomial map $f_i:\frak{g}\to\frak{g}$ homogeneous of degree $m_i$ for $i=1,\ldots,r$ as the 'gradient' of $\phi_i$ with respect to the Killing metric, i.e., 
$$
(\mathrm{d}\phi_i)_X(Y) = \langle f_i(X),Y\rangle.
$$
Because $\phi_i$ is ad-invariant, it satisfies $(\mathrm{d}\phi_i)_X\bigl([X,Y]\bigr)=0$ for all $Y\in\frak{g}$. Consequently,
$$
\bigl\langle [X,f_i(X)],Y\bigr\rangle = -\bigl\langle f_i(X),[X,Y]\bigr\rangle = 0
$$
for all $Y$, and, since the Killing form is nondegenerate, this implies that $[X,f_i(X)]$ vanishes identically on $\frak{g}$.  (Note that $f_1(X) = X$.)
By Kostant's result, the vectors $f_1(X), f_2(X),\ldots, f_r(X)$ are linearly independent and hence are a basis of $Z_{\frak{g}}(X)$ for all $X\in\frak{g}^{\mathrm{reg}}$.
Thus, these polynomial vector fields furnish a solution to the OP's problem.
