In most basic abstract algebra courses, the free group is directly constructed, a process that I find rather unwieldy. An alternate method of characterizing the free group is by means of its universal property: for any function $f:S\to G$, an arbitrary group, there is a function $g:S\to F_{S}$ and a unique homomorphism $\varphi: F_{S}\to G$ such that $f=\varphi g$. Of course, a direct construction of the free group is necessary to show that any group actually satisfies this definition. I was wondering what happened when the definition was dualized. In other words, let $P_{S}$ be the group such that for any function $f:G\to S$, there is a function $g:P_{S}\to S$ and a unique homomorphism $\varphi:G\to P_{S}$ such that $f=g\varphi$. It would seem, in light of Cayley's theorem, that $P_{S}$ is just the set of permutations on $S$, but I'm not sure of this. Does anyone know what $P_{S}$ is?

As has been noted in the comments, your definition of "free group on $S$" is not quite right. The map $g\colon S\to F_S$ is fixed, and is part of the "free group" (that is, the free group on $S$ is the pair $(F_S,g)$, with $g\colon S\to F_S$ a settheoretic map). The universal property is that for every set map $f\colon S\to G$ into an arbitrary group, there exists a unique homomorphism $\varphi\colon F_S\to G$ such that $g = \varphi f$. But $f$ is not allowed to depend on $g$. It is not hard to see that no such "cofree group" can exist on sets with more than one element. Suppose that you have a set $S$ with more than one element, and a "cofree group" on $S$, $C_S$, together with a settheoretic map $f\colon C_S\to S$ such that for every group $G$ and every settheoretic map $g:G\to S$, there exists a unique homomorphism $\varphi\colon G\to C_S$ such that $f = g\varphi$. Let $a\in S$ be different from $f(e)$; then the map $g\colon G\to S$ with $g(x)=a$ cannot factor through $C_S$. As for the case $S=\{s_0\}$, uniqueness of $\varphi$ forces $C_S$ to be the trivial group, because both the zero map and the identity on $C_S$ would satisfy the universal property relative to $f$. The free group construction is the left adjoint of the underlying set functor. In general, left adjoints respect colimits and right adjoints respect limits; that is why the underlying set of a product of groups is the settheoretic product of the underlying sets (underlying set is the right adjoint, so it respects limits like the product), and why the free group on the disjoint union of two sets is the free product of the free groups on the two sets (disjoint union being the coproduct in $Sets$, free product the coproduct in $Groups$, and coproduct being a colimit). As James Borger notes, if you had a dual of the free group construction, it would be the right adjoint of the underlying set functor and would therefore have to respect colimits. So that the underlying set of a free product of groups would have to be the disjoint union of the underlying sets of the groups. This does not occur, so no such object can exist. P.S. As has also been pointed out in the comments, the universal property is nice and all, and can prove uniqueness, but in general one needs either very highpower categorical/universal algebraic theorems to deduce existence, or one must actually construct the objects in some way. In the case of free groups, while there are many constructions (e.g., as a "big direct product"; see the reference I'm about to give), it is via words or other equivalent constructions (e.g., the fundamental group of a bouqet of circles) that one can get a better handle of them. But if you like universal constructions (nothing wrong with that!) I recommend taking a look at George Bergman's An Invitation to General Algebra and Universal Constructions. It has three different constructions of the free group in Chapter 2. 

