Let $\pi:X \to S$ be a morphism of schemes (I can assume that $\pi$ is sufficiently nice, e.g. proper and flat, but certainly not smooth).
Does there exist a scheme $I_{X/S}$ which parametrises the irreducible components of the fibres of $\pi$?
In the case where $S = \mathrm{Spec}(k)$ for some field $k$ and $X$ is reduced, it is possible to construct such a scheme by hand. One takes $I_{X/k}$ to be the product of the spectrum of the algebraic closure of $k$ in the function field of each irreducible component of $X$. This has the property that for any field extension $k \subset K$, the points $I_{X/k}(K)$ are in bijection with those irreducible components of $X$ over $\bar{k}$ which are actually defined over $K$.
I am looking for such a construction which works in greater generality. I'm naively hoping that this might be buried in EGA somewhere...
As a closely related example, note that it is quite easy to construct a scheme of connected components, at least when $X/S$ is proper. Namely, one simply takes the Stein factorisation of $\pi$ to obtain a finite scheme $S'/S$, whose fibres parametrise the connected components of the fibres of $\pi$ in a natural way.