Let $n_1, n_2, n_x$ and $n_y$ be positive integers, and denote $[n]:=\{1,\ldots,n\}$. Consider \begin{equation} u_{ij}(x,y) = \langle f_i(x), g_j(y)\rangle \end{equation} for some $f_i\in\mathbb{R}^{n_y}$, $g_j\in\mathbb{R}^{n_y}$ and for all $(i,j)\in[n_1]\times[n_2]$ and $(x,y)\in[n_x]\times[n_y]$. (The inner product is the standard one in $\mathbb{R}^{n_y}$.)
We may note that for fixed $(x,y)$ (say $(1,1)$), the matrix $U\in\mathbb{R}^{n_1\times n_2}$ whose entries are the $u_{ij}(1,1)$ is of rank at most $n_y$: \begin{equation} U = \begin{bmatrix} \langle f_1, g_1\rangle & \ldots & \langle f_1, g_{n_2}\rangle\\ \vdots & & \vdots \\ \langle f_{n_1}, g_1\rangle & \ldots & \langle f_{n_1}, g_{n_2}\rangle \end{bmatrix} = \sum_{k=1}^{n_y} \begin{bmatrix} f_1^{[k]}g_1^{[k]} & \ldots & f_1^{[k]}g_{n_2}^{[k]}\\ \vdots & & \vdots \\ f_{n_1}^{[k]}g_1^{[k]} & \ldots & f_{n_1}^{[k]}g_{n_2}^{[k]} \end{bmatrix} = \sum_{k=1}^{n_y} f^{[k]}g^{[k]^\top}, \end{equation} so a sum of $n_y$ rank-1 matrices, with $f^{[k]}\in\mathbb{R}^{n_1}$ and $g^{[k]}\in\mathbb{R}^{n_2}$.
My question is:
Can one assemble a matrix $D\in\mathbb{R}^{n_1n_xn_y\times n_2}$ or $D\in\mathbb{R}^{n_1n_x\times n_2n_y}$ from $u_{ij}(x,y)$ which is of rank at most $n_xn_y$ (or similar)?