While trying to come up with some examples of functors, I realised that any function $f:X\to Y$ induces a function $P_f: \mathbb{P}(X) \to \mathbb{P}(Y)$ in a natural way, simply define $f_p(A) = f(A) $ for subsets $A\subseteq X$. Furthermore, every powerset of a set $X$ is a Boolean Algebra with join and meet given by intersection and union respectively. I believe (but am not certain) that every Boolean Algebra is also isomorphic to the powerset of some set. The next realisation was that the function $f_p: \mathbb{P}(X)\to \mathbb{P}(Y)$ is a homomorphism of Boolean Algebra's iff the function $f$ is injective. Clearly if $f$ is injective, then for any $A,B\subseteq X$ we have $f_p(A\cap B) = f_p(A)\cap f_p(B)$, and joins are preserved even without injectivity. Conversely, if $f_p$ is a homomorphism of Boolean Algebra's, then for any two distinct singletons we have $$f_p(\{x\}\cap\{y\}) = f_p(\{x\})\cap f_p(\{y\}) = \{f(x)\}\cap \{f(y)\} = \emptyset $$
Hence, $f$ is injective.
So we can make a sort of "partial functor" (I am not sure this is a thing) that sends objects and monomorphisms from $\operatorname{Set}$ to the category of Boolean Algebra's, and if we compose this with the forgetful functor from Boolean Algebra's back into sets, we have a natural way to categorically represent the powerset of a set.
Questions: I am trying to self study Category Theory, and do not feel confident with some of the concepts above, so my questions are
Is my thinking correct?
Is this a known construction, or is it a specific example of a class of constructions? If so, what are other examples?
Additionally, if I used any terms incorrectly, or unconventionally for the field, I would appreciate feedback regarding this!
Morphisms of Boolean algebras also need to preserve the top element. Here it means that the map needs to satisfy $f_*(X)=Y$ which means it is surjective. Combined with your observation this means that $f$ is bijective. So this is not very interesting, but yeah we have a functor from the category of sets with bijections to the category of Boolean algebras. The image consists of all complete atomic Boolean algebras (not every Boolean algebra is a power set).
If you want all maps, you need to dualize. If $f : X \to Y$ is any map, it induces a morphism of Boolean algebras $f^* : P(Y) \to P(X)$. This actually induces an equivalence of categories $$\mathbf{Set}^{\mathrm{op}} \cong \mathbf{CABA},$$ where $\mathbf{CABA}$ denotes the category of $\mathbf{c}$omplete $\mathbf{a}$tomic $\mathbf{B}$oolean $\mathbf{a}$lgebras. Interestingly, this provides a proof that $\mathbf{Set}^{\mathrm{op}}$ is monadic over $\mathbf{Set}$.
You have asked for generalizations, and sure there are, but I suggest that you make this question more specific.