Is it possible to choose set-number of elements from class?

Let $X$ be a set.

Suppose $\forall x\in X$, there exists $(y_1,...,y_n)$ such that $\phi(x,y_1,...,y_n)$.

Then, does there exist a set $Y$ such that for each $x\in X$, there exists $(y_1,...,y_n)$ such that $\phi(x,y_1,...,y_n)$ and $(x,(y_1,...,y_n))\in Y$?

Informally speaking, when $\mathscr{C}$ be a proper class and if we know that for each $x\in X$, there exists $y\in \mathscr{C}$ satisfying $\phi(x,y)$, can we construct a choice function $f:X\rightarrow \mathscr{C}$ such that $\phi(x,f(x))$?

EDIT

Here is a concrete example.

Definition

Let $X$ be a set and $x\in X$. Let's say $(U,\phi,E)$ is a chart of $X$ at $x$ when $U\subset X$ and $\phi:U\rightarrow E$ is an injection and $E$ is a real Banach space and $x\in U$.

Let $X$ be a set and $Y\subset X$. Assume that for each $x\in X$, there exists a chart $(U,\phi,E)$ of $X$ at $x$ such that there exists a closed subspace $E',V$ of $E$ such that $E=E'\oplus V$ and $\phi(U\cap Y)=\phi(U)\cap E'$.

Now, I want to extract a collection $\{(U_x,\phi_x,E_x)\}_{x\in X}$ from this definition.

I read articles about Scott's trick, but I don't get how to apply this to do so.

Question1: Does there exist the ordinal $\alpha_x$ such that it is the least rank of charts $(U,\phi,E)$'s of $X$ at $x$ such that there exists a closed subspace $E',V$ of $E$ such that $E=E'\oplus V$ and $\phi(U\cap Y)=\phi(U)\cap E'$?

Since the collection of all such $(U,\phi,E)$'s are not a set, I don't know how to extract such $\alpha_x$.

Question2. Say, we have well-defined those $\alpha_x$'s for all $x\in X$. Then, does there exist a function $f$ whose domain is $X$ and $f(x)=\alpha_x$?

We can ask what is the least ordinal $\alpha_x$ such that a chart for $x$ exists inside $V_{\alpha_x}$. This is a definable function, and $X$ is a set. So the range of this function is a set of ordinals. So there is some $\alpha$ such that all the needed evidence lies inside $V_\alpha$.
Now you have a set of non-empty sets, all of which lie inside $V_\alpha$. Using the axiom of choice, you get what you were looking for.
To the second question, note that saying that $\alpha_x$ is well-defined, means that it is in fact a function. So again, by Replacement this gives us a set, since now $\{(x,\alpha_x)\mid x\in X\}$ is a subset of the product of $X$ and $\{\alpha_x\mid x\in X\}$.