Does there exist a function $f : X \to Y$ such that $f \in Y$? 
Does there exist a function $f : X \to Y$ such that $f \in Y$? 

I think this is related to Russell's paradox, but I'm not exactly sure how.

Added Later: As Brian points out, given any function $f : X \to Y_0$, we can just add $f$ to the codomain, that is $f : X \to Y_0\cup\{f\}$ is a function which satisfies my initial request.
However, what if we try to find a surjective function $f : X \to Y$ such that $f \in Y$? 
 A: Let $X=\varnothing$, $Y=\{\varnothing\}$; the unique function $f:X\to Y$ is $\varnothing$, which is an element of $Y$.
Added: For a slightly less trivial example, let $X=\{0\}$ and $Y=\big\{1,\{\langle 0,1\rangle\}\big\}$; then $\{\langle 0,1\rangle\}$ is a function from $X$ to $Y$ that is an element of $Y$. In general start with any function $f$ from $X$ to some set $Y_0$, and let $Y=Y_0\cup\{f\}$; then $f$, regarded now as a subset of $X\times Y$, is a function from $X$ to $Y$ that is an element of $Y$.
A: Let $V_\omega$ be the set of hereditarily finite sets (i.e. sets which are finite, and all their elements are finite, and so on). It is immediate from this definition that if $x\in V_\omega$ and $y\in x$ then $y\in V_\omega$, and if $x\subseteq V_\omega$ is finite, then $x\in V_\omega$.
It's not hard to show that if $X\in V_\omega$ then $\mathcal P(X)\in V_\omega$, and if $X,Y\in V_\omega$ then $X\times Y\in V_\omega$.
Take any set $X\in V_\omega$, then any function $f$ from $X$ into $V_\omega$ is actually a function into a finite subset of $V_\omega$, therefore there exists a finite $Y\in V_\omega$, such that $f\subseteq X\times Y$. Therefore $f\in V_\omega$.

For the addition, suppose that $f\colon X\to Y$ and $f\in Y$. If there exists some $x\in X$ such that $\langle x,f\rangle\in f$, then this a contradiction to the axiom of regularity because $\langle x,f\rangle =\{\{x\},\{x,f\}\}$ by the Kuratowski definition of an ordered pair, because this  means that $$f\in\{x,f\}\in\langle x,f\rangle\in f.$$
In particular $f$ cannot be surjective.
Note that regularity is necessary for this proof, otherwise we can have a set $X=\{X\}$. Note that in this case: $$\langle X,X\rangle=\{\{X\},\{X,X\}\}=\{\{X\}\}=\{X\}=X.$$
Therefore $X\times X=X$ which is the identity function from $X$ onto itself.
A: This definition of function is from general topology by Engelking:

Any subset of the Cartesian product $X \times Y$ is a relation. The relation $f\subset X\times Y$ is called a function from $X$ to $Y$, or a mapping of $X$ to $Y$, if for every $x\in X$ there exists a $y \in Y$ such that $(x,y)\in f$ and $y$ is uniquely determined by $x$, i.e., $(x,y) \in f$ and $(x,y') \in f$ imply $y=y'$.

If $f \in Y$, then there exists subset of $X\times Y$ such that it is the element of $Y$. 
For example, if $Y$ has $\emptyset$, then the answer to the question is always true.
