How do you write that a unique element exists in a collection? I'm a bit rusty on my math notations and I'd like to write that:

It exists a unique element $z$ such that $z$ belongs to the collection of values returned by $f(x,y)$

Honestly I'm not just rusty I'm also mostly ignorant of math except from basic functions and basic matrix operations.
I'm in the context of computer programming and I want to write down a specification, and for my own curiosity (and fun) I was wondering how this would be written in a more scientific way.
I'd go with something like:

$\exists z\in S$ such that...

And then I'm lost with how to specify that $S$ is the result of $f(x,y)$.
Some usage of $P(z)$ maybe ?
Also $S$ means "set" right? So it doesn't work because $z$ may be present multiple times, but IDK if there's a symbol for such "collection".
I've googled around but it's a bit hard to find the right keywords for searching something like this.
Thank you.
EDIT:
I knew I'd make a mistake while posting this... I've mistakenly named $x$, $x$, leading to the confusion that it is the same $x$ that is in $f(x,y)$, while actually it is not.
So I have renamed it $z$, sorry about that.
EDIT 2:
There are multiples solutions that have been provided in the answers and for this I'm thankful, but I can't identify if one matches what I want.
And there are also a lot of questions which I believe are due to me not giving enough details or not expressing myself correctly, and I realize now that I have made a mistake on the way so I will try to add more details and maybe it will help to make the answers converge.
I have a function, say $f$, that given two arguments, say $x\in X$ and $y\in Y$, will return a collection of values, say $S$ whose values are taken from $Z$.
And I want $S$ to contain only $z$ (possibly multiple times).
Given $S1$ and $S2$ the respective results of $f(x1,y1)$ and $f(x2,y2)$, there can not be a given $z$ that would be present in both $S1$ and $S2$.
For the record, $y1$ may be equal to $y2$.
Also $y$ depends on $x$ so I guess we start with the second part of what @celtschk said in his comment and simplify:

$$S = \bigg\{f(x, g(x)) : x ∈ X \bigg\} ⊂ Z$$

But the first part should be:

"$z$ exists at least once and is unique in $S$"

and I don't know how to write that :)
 A: 
$$\exists !\ x\in S \text { s.t. } \exists\ y \text { s.t. }(x,y)\in Dom(f) \land f(x,y)=x.$$

There exists a unique $x\in S$ such that there exists an $y$, such that the tuple $(x,y)$ is in the domain of $f$ and for which $f(x,y)=x$.
A: You need to carefully understand, what sets is your function mapping from and to.
Judging by your first post, I'd say that $S$ is probably a multiset. (That is a set together with multiplicities for each element.)
So, you function definition would look like:
$f: X\times Y \to (S, m)$, where $m: S \to N$
Then the constraint on $z$ would look like: 
$\exists! z:  f(x,y) = (S, m) \land m(z)=1 $
A: It looks like you are just trying to say
$$\exists! (x, y) ~:~ f(x, y) = z$$
or less abbreviated:
$$\exists x~\exists y~ \bigg(f(x, y) = z \land \bigg(\forall x_2 ~ \forall y_2~ ~:~ f(x_2, y_2) = z \implies (x_2 = x \land y_2 = y)\bigg)\bigg)$$
If I interpret your question correctly, you are trying to say that $z$ exists exactly once in the image of $f$.
If you are comfortable with set comprehension, then you could also write:
$$\left|\bigg\{ x, y ~:~ f(x,y) = z \bigg\}\right| = 1$$
A: First we define the function $f$ properly, i.e. we define it domain and codomain:
$$f:X\times Y\to D$$
Then we just write
$$\exists !z\in f(X,Y)\text{ such that...(whatever)}$$
where $f(X,Y)$ is the image of the function. For any function the image is a subset of the codomain, i.e.
$$f(X,Y)\subseteq D$$
You need to complete the reason why you are defining this unique $z$ if not the statement is confuse.
