For an object $X$ in a category with finite products, define its endomorphism Lawvere theory to be the Lawvere theory generated by $X$: its $n$-ary operations are given by $\text{Hom}(X^n, X)$, and so accordingly it describes the most general algebraic structure that $X$ possesses. Some quick examples:
The endomorphism Lawvere theory of the abelian group $\mathbb{Z}$ is the Lawvere theory of abelian groups. (This is specific to abelian groups.)
The endomorphism Lawvere theory of the set $2 = \{ 0, 1 \}$ is the Lawvere theory of Boolean algebras, or equivalently Boolean rings. This recently came up here.
The endomorphism Lawvere theory of Sierpinski space is, I believe, the Lawvere theory of (bounded) distributive lattices, although I haven't checked this.
As an interesting generalization of the second example, the endomorphism Lawvere theory of the set $3 = \{ 0, 1, 2 \}$ is the Lawvere theory of a ternary generalization of Boolean rings: $\mathbb{F}_3$-algebras such that every element $x$ satisfies $x^3 = x$. This follows from the fact that every ternary function $3^n \to 3$ can be represented as a polynomial over $\mathbb{F}_3$ which is unique if we require that the degree of the polynomial in each variable is at most $2$, or equivalently if we impose the relation $x^3 = x$ on each variable.
Unfortunately, I'm not sure how to continue this pattern: that is,
What is the endomorphism Lawvere theory of the finite set $4 = \{ 0, 1, 2, 3 \}$? Of any finite set?
(An answer should be a description in terms of generators and relations - some operations that generate all the others under composition and product, and the axioms they satisfy - which is ideally related to familiar algebraic structures such as rings.)
I am only confident I know the answer for a finite set of prime size $p$, which again generalizes the Boolean case: it should be $\mathbb{F}_p$-algebras such that every element satisfies $x^p = x$.