Hints for proving that the collection of all set functions whose domain is the set $X$ and whose range is a subset or equal to the set $Y$ is a set. I am trying to figure out how to formally write down a set that contains as its elements sets of ordered pairs with a very specific property (i.e. I want $\Omega=\{A,B,C,...\}$ where $A=\{(\alpha,\beta),(\alpha',\beta'),...\}, B=\{(\gamma,\zeta),(\gamma',\zeta'),...\}$ etc).
The specific property of each set belonging to $\Omega$ can be stated as follows:

Let $D \in \Omega$ be any subset of $X \times Y$ with the property that for each $x \in X$, the set $\{y \in Y : (x,y) \in D\}$ has exactly one element (i.e. $D$ obeys the vertical line test).

One could equivalently view $\Omega$ as being the set of all set functions whose domain is the set $X$ and whose range is a subset (or is equal to) the set $Y$.
Here is what I have to work with. 


*

*The Axiom of Replacement

*The Axiom of Specification

*The fact that $\{Y: Y \text{ is a subset of } X\}$ is a set

*$X \times Y$ is a set


As a side note, the book that I am reading has not yet covered cardinality; however, to capture the property of $D$, I will use the appropriate notation...as I see no way around this (if anyone knows how to avoid this, please tell!)
The difficulty that I am having is literally from the very beginning: I cannot figure out how to form any of the sets $A,B,C,...$ etc. 

I have always thought of the Axiom of Specification as essentially working by progressively populating a new set one element at a time. i.e. I interpreted this axiom as saying, "Look at a given element in the parent set, see if it satisfies some property, and if it does, incorporate this element into the new set. Move on to the next element in the parent set, rinse and repeat". 
This intuitive mental model has served me well up until this point. The issue that I am now running into is that the property of $D$ requires that elements already inside $D$ be referenced during the population effort.
For example, if I want to add some ordered pair $(a,b)$ from $X \times Y$ to $D$, I have to look at what is already inside $D$ in order to determine if $(a,b)$ is eligible/permitted to get added into $D$. This would effectively mean that my set $D$ could turn out completely different depending upon the order with which I populated the set. Clearly, my mental model breaks down and is, therefore, generally incorrect.
I know that the sets contained in $\Omega$ can get their elements from $X \times \text{Arbitrary Subset of Y}$, but before I even get to that, I do not see how to use the axiom of specification to carve out these sets from $X \times Y$.
I have $D=\{(x,y): (x,y) \in X \times Y \land \phi\big(\ (x,y)\ \big)\}$ but I have no clue what $\phi\big(\ (x,y)\ \big)$ should be. 
Any hints would be greatly appreciated!
Edit: the only thing I can think to do is incorporate a another bound variable that references the set...i.e.
$\phi\big(\ (x,y)\ \big) = \forall (w,z) \in D, \text{ if } w=x, \text{ then } z=y$
However, firstly, I don’t know if this is even permitted and, secondly, it still has the issue of leaving $D$ ambiguously defined. (i.e. there are many different sets that could satisfy this...$D$ is not unique)
 A: By Fact 3 there is a set  $\operatorname{Pow}(X\times Y)$ consisting of all subsets of $X\times Y$. Now we can write the definition of $\Omega$ formally (maybe, missing some brackets required by the syntax of the formal language of the set theory).
$$\Omega=\{D\in \operatorname{Pow} (X\times Y): \forall x\in X\,\exists y\in Y((x,y)\in D)\, \&\,  \forall y\in Y\, \forall z\in Y\, (\exists x\in X ((x,y)\in D\, \&\, (x,z)\in D)\Rightarrow  y=z)\}.$$

the Axiom of Specification as essentially working by progressively populating a new set one element at a time. i.e. I interpreted this axiom as saying, "Look at a given element in the parent set, see if it satisfies some property, and if it does, incorporate this element into the new set. Move on to the next element in the parent set, rinse and repeat".

As I understood, the sets, from the point of view of the set theory (both naїve and axiomatic), are considered as actual (that is perfect, finalized) entities, but not potential. So in the set theory the sets are mainly described, not constructed. In particular, a description of a set does not necessarily provides a way to construct it. A famous example is provided by the axiom of choice. 
But I think that even this intuition can be wrong, because in our descriptions we are restricted by the formal language of the set theory. An other famous example is a notion of the set of all sets. I think that this notion is intuitively OK. I recall Cantor’s understanding of a set:

But this straightforward understanding leads to Russell’s paradox and the notion of the set of all sets is excluded in the set theory language. 
As a consequence, given a description of a set-theoretical object, I usually can interpret it, translating the description to a formal language of the set theory, as I tried to do answering your question. 
