I'm curious as to how the values $f(x)$ of a function $f$, which as defined, are the corresponding unique $y$ such that $(x,y)\in f$, are expressed formally in the language of ZFC (or an extension thereof). For example, with the help of the extension by definitions scheme, one can construct conservative extensions of ZFC with additional function symbols such as the power set operation, union, ordered pairs and Cartesian products with their respective definitional axioms. In particular, after proving $$\forall x\exists !y\forall z(\forall w(w\in z\rightarrow w\in x)\leftrightarrow z\in y)$$ in ZFC, we can add a new function symbol $\mathcal P$ to the signature and an additional axiom $$\forall x\forall z(\forall w(w\in z\rightarrow w\in x)\leftrightarrow z\in\mathcal P(x))$$ characterizing the power set of $x$. In this case, we can work out the value of $\mathcal P(x)$ to be the unique $y$ that satisfies the former sentence.
Likewise, we can add predicate symbols to the signature; for instance, the formula "$f$ is a function" is equivalent to $$\forall x(x\in f\rightarrow\exists y\exists z(x=(y,z)))\land\forall x\forall y\forall z(((x,y)\in f\land (x,z)\in f)\rightarrow y=z)$$ assuming we have extended the theory to capture the notion of ordered pairs. Moreover, we can add a ternary predicate so that the formula $f:X\to Y$ has its intended meaning in our supertheory, in a similar fashion.
The problem however occurs where we define the term $f(x)$ as the unique $y$ such that $(x,y)\in f$. How is this done formally? Do we add a new function symbol $f$ as a means to extend our supertheory so that $f(x)$ becomes a term? That can't be the case since $f$ would otherwise be undefined for most of the domain of discourse contrary to the behavior of function symbols in the signature such as $\mathcal P$.
Sure, the notation for $f(x)=y$ can be dismissed as an abbreviation for $(x,y)\in f$, but there are formulas that treat the notation differently where $f(x)$ is treated as a legitimate term, such as the formal statement of AC: $$\forall X(X\ne\emptyset\rightarrow\exists f(f:X\to\bigcup X\land\forall A(A\in X\rightarrow f(A)\in A)))$$ which just can't be a well-formed formula unless $f$ is a function symbol. My thoughts are that in this example, $f(A)\in A$ could very well be just an abbreviation for $\forall z((A,z)\in f\rightarrow z\in A)$. Does this suffice for everytime $f(x)$ is treated as a legitimate term?