  We study a one dimensional gas of $N$ noninteracting diffusing particles in a
harmonic trap, whose stiffness switches between two values $\mu_1$ and $\mu_2$
with constant rates $r_1$ and $r_2$ respectively. Despite the absence of direct
interaction between the particles, we show that strong correlations between
them emerge in the stationary state at long times, induced purely by the
dynamics itself. We compute exactly the joint distribution of the positions of
the particles in the stationary state, which allows us to compute several
physical observables analytically. In particular, we show that the extreme
value statistics (EVS), i.e., the distribution of the position of the rightmost
particle has a nontrivial shape in the large $N$ limit. The scaling function
characterizing this EVS has a finite support with a tunable shape (by varying
the parameters). Remarkably, this scaling function turns out to be universal.
First, it also describes the distribution of the position of the $k$-th
rightmost particle in a $1d$ trap. Moreover, the distribution of the position
of the particle farthest from the center of the harmonic trap in $d$ dimensions
is also described by the same scaling function for all $d \geq 1$. Numerical
simulations are in excellent agreement with our analytical predictions.
