Suppose $i: X \hookrightarrow \mathbb{P}^n_k$ is a projective scheme, over some field $k$ (I'm not sure if algebraically closed is necessary here). So $X$ comes together with an ideal sheaf and a short exact sequence $$ 0 \rightarrow \mathcal{I}_X \rightarrow \mathcal{O}_{\mathbb{P}^n} \rightarrow i_* \mathcal{O}_X \rightarrow 0.$$ Topologically $X$ consists of finitely many irreducible components. I would like to know if it is always possible to write $X$ as a scheme-theoretic union of irreducible subschemes $X_i \hookrightarrow X$, i.e. $\mathcal{I}_X = \bigcap_i \mathcal{I}_{X_i}$.
I think this works if $X$ is reduced, then one can just take the irreducible components together with the reduced structure as $X_i$, and $\mathcal{I}_X = \bigcap_i \mathcal{I}_{X_i}$, because the intersection of radical ideals is again radical, and two radical ideals with the same vanishing locus are equal, by Hilbert's Nullstellensatz.
Does this have anything to do with primary decomposition? Wikipedia states that there is some scheme theoretic interpretation of primary decomposition, but suppose $\mathcal{I}_X$ is the intersection of non-primary ideals, then why should it be possible to write it as the intersection of primary ideals?