A commutative monoid $M$ has the nice property that given a set $S$, the set of functions $S \to M$ forms a commutative monoid (under pointwise addition). The same statement without any mention of commutativity is true.
Now, consider a cartesian closed category $C$. In other words, the category $C$ has finite products, is considered as a monoidal category under $\times$, and has internal mapping objects. Fix an object $S \in C$. I believe it is true that if $M$ is a commutative monoid in $C$, then $M^S$ is a commutative monoid in $C$.
Is there a slick proof of this fact using the Eckmann-Hilton argument?
I actually have not seen a proof of this fact by any means. I think it's just an exercise in handling exponential objects. I would guess that the candidate multiplication $M^S \times M^S \to M^S$ is the map corresponding to $f \mapsto (S \xrightarrow{f \times g} M \times M \to M)$ under the identification $\text{Hom}(M^S \times M^S, M^S) \cong \text{Hom}(M^S, (M^S)^{M^S})$ granted by closedness.
My question is whether you can alternatively just show that this operation and another commute over each other (in the sense of the Eckmann-Hilton argument) thus are equal and commutative. One idea is to generalize the following example.
Example. Given a set $S$ and a commutative monoid $M$. Then we can define two monoidal operations on $\text{Hom}(S,M)$ which take $f,g$ to two maps: $$ X \xrightarrow{\Delta} X \times X \to X \coprod X \xrightarrow{f \coprod g} M $$ $$ X \xrightarrow{f \times g} M \times M \to M $$ Which (either by directly checking or by the Eckmann-Hilton argument) are equal and commutative operations.
One of the maps in this example is defined using finite coproducts. If we assume $C$ has finite coproducts, then I think one can argue identically (via Eckmann-Hilton) that $M^S$ is a commutative monoid object. That is to say, if we add the assumption that $C$ has finite coproducts, then the answer to my question is yes.
I am curious if there's a way to make an Eckmann-Hilton type proof without using coproducts.