I want to define sets where each element can be a function mapping from its respective set. For instance, if one defines each element with a functional and state component:
For a set of static elements like $S = \{1,2,3,4\}$ which is a shorthand for all functional components being equivalent to the identity function on the state component e.g. $S = \{id|1,id|2,id|3,id|4\}$
One can show $\{1,2,3,4\} \mapsto \{1,2,3,4\}$
Now let's define $\sigma$ as a function that maps the sum of all state components outside its element to the state of its element across a morphism such that:
For the set $S = \{\sigma|1, 2, 3, 4 \}$
$\{\sigma| 1,2,3,4\} \mapsto \{\sigma| 9,2,3,4\} \mapsto \{\sigma| 9,2,3,4\}$
And for a set $S = \{\sigma| 1, \sigma| 2, 3, 4 \}$
$\{\sigma| 1,\sigma|2,3,4\} \mapsto \{\sigma | 9,\sigma| 8,3,4\} \mapsto \{\sigma| 15,\sigma| 16,3,4\}$
Alternatively one can do away with components for something like below, with $\sigma$ being a function that maps the sum of all other elements to a new element, without mapping itself:
For the set $S = \{\sigma, 2, 3, 4\}$
$\{\sigma,2,3,4\} \mapsto \{ 9,2,3,4\} \mapsto \{9,2,3,4\}$
If one wants to show a set like $S = \{\sigma_1, \sigma_2, 3, 4\}$ then one can add conditions to definition of $\sigma$ e.g. sum of all other elements given they are real numbers, otherwise a default value, or sum of only the real numbers in the set.
Say $\sigma_1$ maps to 1 if not all of the other elements are real, and $\sigma_2$ maps to sum of only the reals such that: $\{\sigma_1, \sigma_2, 3, 4\} \mapsto \{1, 7, 3, 4\}$
One could also go deeper with elements that map to multiple elements or no elements, elements that map to themselves conditionally for something like $f\rightarrow 5 \iff 3 \in S \ \vee f \rightarrow f$ etc.
I have been trying to find literature studying concepts along these lines, most likely linked to functional analysis, operator theory or category theory but so far have been unsuccessful. Where should I look? Also, in the worst case scenario there is nothing to reference along these lines at all, where can I branch off from?