Actually, if you can define proper classes as such, you are probably in a theory with classes like NBG, so you have the "class comprehension" axiom schema which says that any formula that does not quantify over classes actually defines a class.
Let $F$ be a function defined on a proper class $X$, and let $\phi$ the formula (with free variable $y$ and quantified variable $p$) $ \exists p:p\in F \wedge \pi_2(p)=y $ where $\pi_2$ is the projection on the second component: $ \pi_2(p) = w \equiv \exists t\in p:(w\in t)\wedge (\forall (r,s \in p)\; r\neq s \implies w\notin r \vee w\notin s) $ or as finite set operations: $ ⋃\left( ⋃p \setminus ⋂p \right) $ This formula defines a new class, that is in fact the codomain of $F$.
In general, classes cannot be put into sets, but you only need sets when there is an arbitrary number of classes, for instance you can define the product of two classes as a formula $ X\times Y = \{z: \pi_1(z)\in X \wedge \pi_2(z)\in Y\} $ where $\pi_1$ and $\pi_2$ are the usual projections.