The theory of quadratic residues is long- and well-studied. Recall that, [somewhat simplified] if $x,a,b$ are integers, with $0 \le a < b$, such that $$x \equiv a^2\!\!\!\pmod{b},$$ then we say that $x$ is a quadratic residue modulo $b$.
Extensions have been made (or at least attempted) for higher powers, e.g., cubic residues, quartic residues, etc. Let’s call this the “vertical” direction.
QUESTION: Has anyone tried extending the theory of quadratic residues in the “horizontal” direction, i.e., developing a theory around residues of more than one square?
For example, if $x,a,b,c$ are integers, with $0 \le a \le b < c$, such that $$x \equiv a^2+b^2\!\!\!\pmod{c},$$ then we could say that $x$ is a two-square residue modulo $c$. Extending the thought-experiment a few steps further, the Four-Square Theorem would be equivalent to saying that every integer is a four-square residue modulo every larger integer, etc.
Such horizontal extension is not really interesting, since every element of $\mathbb{F}_p$ can be represented as a sum of two squares by the Cauchy-Davenport theorem. In particular in $\mathbb{F}_p$ the subset of elements that cannot be represented as the sum of two squares is empty.