Let $\mathbb{D}^n \subseteq \mathbb{R}^n$ be the closed $n$-dimensional unit ball. Let $h:\mathbb{D}^n \to \mathbb{R}^{k}$ be smooth, and suppose that $h(x) \neq 0$ a.e. on $\mathbb{D}^n$. Set $$V_h=\{ \,\,f \in C^{\infty}(\mathbb{D}^n;\mathbb{R}^{k}) \, \,\,| \, \, (df_x)^T\big(h(x)\big)=0 \, \text{ for every }\, x \in \mathbb{D}^n \, \} $$
$V_h$ is a real vector-space. Is it always finite-dimensional? Can it be infinite-dimensional for some $h$?
Edit:
Pozz showed nicely that when $k=1$, $V_h$ always coincides with the space of constant functions, and that for $k>1$, $V_h$ might be infinite-dimensional (e.g. if $h$ is a constant function).
Is there ever a case where $V_h$ is finite-dimensional when $k>1$? I suspect that the answer is negative, but I don't know how to prove this.
Let us write the condition $(df_x)^T(h(x))=0$ more explicitly. We can write $$ (df_x)^T=\bigg(\nabla f^1(x)\,\bigg|\,...\,\bigg|\,\nabla f^k(x)\bigg), $$ where $\nabla f^i(x)$ is the column vector given by the Euclidean gradient of $f^i$, where the $f^i$'s are the components of $f$ for $i=1,...,k$. Hence the condition defining $V_h$ becomes $$ (df_x)^T(h(x))=0\quad\forall x \qquad\Leftrightarrow\qquad \langle \partial_j f(x), h(x) \rangle =0\,\,\quad\forall j=1,...,n\quad \forall x$$ where $\langle\cdot,\cdot\rangle$ denotes the Euclidean product.
If $k=1$, we can then prove that $V_h$ is the $1$-dimensional vector space of constant functions. Indeed, if $f\in V_h$ then $h(x)\partial_j f(x)=0$ for any $j=1,...,n$ and any $x$. Since $h(x)\neq0$ almost everywhere, then $\partial_j f(x)=0$ for any $j=1,...,n$ and at almost every $x$. Since $f$ is smooth, then $\nabla f$ is actually identically zero, and thus $f$ is constant.
If $k>1$ we can find an example of $h$ such that $V_h$ is infinite-dimensional. Consider in fact $h(x)=(1,0,...,0)$, that is smooth and non-zero. In this case, if $f\in V_h$ then $$ \langle\partial_j f(x),h(x)\rangle=\partial_jf^1(x)=0 \,\,\quad \forall j=1,...,n\quad\forall x. $$ This implies that any function $f=(0,f^2,...,f^k)$ belongs to $V_h$ for any choice of $f^2,...,f^k$ smooth. And thus $V_h$ is infinite-dimensional.