TITLE: Formula of $\bigcap X$ when $X$ is a class
QUESTION [6 upvotes]: When $X$ is a set, I know we could define $\bigcap X$ as$Z$ such that $z \in Z \to \forall x \in X(z \in x)$ 
If $X$ is a class,  we may run into problem in the process of determining whether an element belongs to $X$. Thus, it seems to me it's not legitimate to write $\forall x \in X$. How could we overcome such difficulty?
ADDED: I want to show "$x$ is a natural number" is $\Sigma_0$ in Levy hierarchy(a lemma without proof on page 28, Constructibility, K.J.Devlin). So I have to define natural number in the first place, which is the intersection of all inductive sets, but all inductive sets constitute a proper class.

REPLY [4 votes]: This answer only deals with the added note in the OP.
An alternate way to show that "$x$ is a natural number" is expressible as a $\Sigma_0$-formula is to actually go through the work and do it.  The following will not depend on the Axiom of Infinity.  Note that $x$ is a natural number iff $x$ either $x = \emptyset$, or $x$ is a successor ordinal and all elements of $x$ are either $\emptyset$ or successor ordinals.  Now it is just a matter of going through the steps:

assuming enough of ZFC, "$x$ is an ordinal" iff "$x$ is transitive and well-ordered by $\in$":

"$x$ is a transitive set" may be expressed as $( \forall y \in x ) ( \forall z \in y ) ( z \in x )$;
"all pairs of elements of $x$ are $\in$-comparable" may be expressed as $( \forall y \in x ) ( \forall z \in x ) ( y = z \vee y \in z \vee z \in y )$;
note that if all pairs of elements of $x$ are $\in$-comparable, then by Foundation (you need a small bit more, but not much) it will follow that $\in$ is a transitive relation on $x$;
by Foundation (essentially) $\in$ is an asymmetric relation on all sets;
by Foundation $\in$ is well-founded;

"$x$ is a successor ordinal" is expressed as "$x$ is an ordinal $\wedge ( \exists y \in x ) ( \forall z \in x ) ( z \in y \vee z = y )$";
"$x = \emptyset$ is expressed as $( \forall z \in x ) ( z \neq z )$.

Note that all of the formulas above are $\Sigma_0$, and so boolean combinations and restricted quantifications of these are also $\Sigma_0$.  Now just put all these parts together to express "$x$ is a natural number" as a $\Sigma_0$ formula.