Number of distinct functions on a vector space $\mathbb{N}^3$ Let $k$ be an integer at least $4$ and let $[k] = \{1,2,\ldots,k\}$. Let $f:[k]^4 \to\{0,1\}$ be defined as follows:
$$f(y_1,y_2,y_3,y_4) = 1\ \mathrm{iff\ the\ y_i's\ are\ all\ distinct}$$Now for each choice $\mathbf{z}=(z_1,z_2,z_3)\in[k]^3$, let $g_\mathbf{z}:[k]\to\{0,1\}$ be defined by $g_\mathbf{z}(Y)=f(Y,z_1,z_2,z_3)$. Let $N$ be the number of distinct functions $g_\mathbf{z}$ that are obtained as $\mathbf{z}$ varies in $\{1,2,\ldots,k\}^3$, that is, $N=|\{g_\mathbf{z}:\mathbf{z}\in\{1,2,\ldots,k\}^3\}|$. What is $N$ ?
$i)\ \ k^3+1\ \ \ \ \ \ \ \ ii)\ \ 2^{k\choose3}\ \ \ \ \ \ \ \ iii)\ \ {k\choose3}\ \ \ \ \ \ \ \ iv)\ \ {k\choose3}+1\ \ \ \ \ \ \ \ v)\ \ 4\cdot{k\choose3}$

What I'm feeling is that the number of distinct functions $g_\mathbf{z}$ has nothing to do with its relation with function $f$, as it (and so does the value of $N$) depends entirely on the choice of $\mathbf{z}$ from $[k]^3$. Now since $\mathbf{z}=(z_1,z_2,z_3)$, we've $k$ choices for each of $z_1,z_2$ and $z_3$. So in total there should be $k^3$ number of distinct functions $g_\mathbf{z}$. For example, for the choice of $(1,1,1)$ and $(1,1,2)$, we've $2$ distinct $g_\mathbf{z}$'s namely: $g_{(1,1,1)}$ and $g_{(1,1,2)}$.
But unfortunately my understanding of the problem is not compliant with that of the answer choices.

 A: First note that if any two of the coordinates of $\mathbf{z}$ are equal, then $g_{\mathbf{z}}$ is the identically zero function (because $g_{\mathbf{z}}(x) = f(x, z_1, z_2, z_3) = 0$ as the entries are not all distinct).
Now if $\mathbf{z} = (z_1, z_2, z_3)$ and the $z_i$ are all different, then the function $g_{\mathbf{z}}$ depends only on the set $\{z_1, z_2, z_3\}$ and not the order.  There are $\binom{k}{3}$ such sets.  So it remains to show that every such set of three numbers gives a distinct function.
Consider two triples $\mathbf{z} = (z_1, z_2, z_3)$ and $\mathbf{y} = (y_1, y_2, y_3)$ where the set of the $z$s and the set of the $y$s are different, the $z$s are all distinct, and the $y$s are all distinct.  Since the sets are different, there is some $i$ ($1\leq i \leq 3$) such that $z_i \not \in \{y_1, y_2, y_3\}$.  It follows that $g_{\mathbf{y}}(z_i) =1$ while $g_{\mathbf{z}}(z_i) = 0$.  Hence the functions $g_{\mathbf{z}}$ and $g_{\mathbf{y}}$ are different.
Therefore, we have the identically $0$ function, which is achieved by any triple $\mathbf{z}$ with a repeated entry, and $\binom{k}{3}$ distinct and not identically zero functions achieved by taking $\mathbf{z}$ to be any set of three elements from $[k]$.  Hence the answer is $\displaystyle \binom{k}{3}+1$.
