Defining a tricky function: $(A \rightarrow \mathcal{P}(B)) \rightarrow\mathcal{P}(A \rightarrow B)$ How would I define a function of the form:
\begin{align*}
\phi: (A \rightarrow \mathcal{P}(B)) \rightarrow\mathcal{P}(A \rightarrow B)
\end{align*}
I know what behaviour I want, I'm just struggling to define it. For example,
consider a function 
\begin{align*}
&f: {0, 1} \rightarrow \mathcal{P}(\{0, 1, 2, 3\}) \\
&f(0) = \{0, 1\} \\
&f(1) = \{2, 3\} \\
\end{align*}
I want $\phi(f)$ to be:
\begin{align*}
&\phi(f) = \{g_1, g_2, g_3, g_4 \} \\
&g_1(0) = 0 \qquad g_1(1) = 2 \\
&g_2(0) = 0 \qquad g_2(1) = 3 \\
&g_3(0) = 1 \qquad g_3(1) = 2 \\
&g_4(0) = 1 \qquad g_4(2) = 3 \\
\end{align*}
That is, I want all possible combinations of $\{0, 1\} \times \{2, 3\}$ as functions.

This is not properly speaking an answer to the question ; it is an attempt to see more clearly what all this is about.
I will use the term "application" as a synonym to a function $f:E \to F$ such that every $e \in E$ has an image $f(e) \in F$.
You must know the following notations :


*

*$F^{E}$ for the set of applications from $E$ to $F$ and, as a particular case

*$\{0,1\}^G \cong 2^G$ for the (well named) power set, i.e., the set of subsets of set $G$.


(see for example : https://math.stackexchange.com/q/104524)
If I understand well, you are asking whether there is a (more or less natural) way to find a "path" between :
$ \ \ \ \ \ \ \ \ S_1:=(2^B)^{A}\cong 2^{B \times A}$ and $S_2=2^{(B^{A})}.$
The first isomorphism drives us to the partitions of the cartesian product $B \times A$ or the isomorphic set $A \times B$. Among such partitions, there are those which define an application from $A$ to $B$, i.e., a partition that is $\{(a_1,b_1),(a_2,b_2),...(a_n,b_n)\}$ where $\{a_1,a_2,...a_n\}=A$ (every element of set $A$ is present exactly once). Thus, in a certain sense, the set of applications $f:A \to B$ is included into $S_1$.
Concerning $S_2=2^{(B^{A})}$, it could be described as the ways to group applications. It is a much "larger" set than $S_1$, and I don't see any clearcut correspondence between  $S_1$ and $S_2$.
