In Category theory, a generalized element of an object X of a category is any morphism x:A→X with codomain X. In this situation, A is called the shape, or domain of definition, of the element x. We'll unpack this.
Generalized elements generalize elements
We'll need a set with a single element: for concreteness, let us denote it I, and say that its single element is ∗. That is, let I={∗}. For a given set X, there is a natural correspondence between the following notions: an element of X, and a function from the set I to the set X. On the one hand, if you have an element x of X, you can define a function from I to X by setting f(i)=x for any i∈I; that is, by taking f to be the constant function with value x. On the other hand, if you have a function f:I→X, then since ∗ is an element of I, f(∗) is an element of X. So in the category of sets, generalized elements of a set X that have shape I, which are by definition maps I→X, are the same thing (at least up to isomorphism, which as usual is all we care about).
Generalized elements in sets
In the category of sets, if a set A has n elements, a generalized element of shape A of a set X is an n-tuple of elements of X. [todo: is there more to say here? or less?]
Sometimes there is no `best shape'
Based on the case of sets, you might initially think that it suffices to consider generalized elements whose shape is the terminal object [todo: add link] 1. However, in the category of groups, since the terminal object is also initial [todo: explain this somewhere], each object has a unique generalized element of shape 1. However, in this case, there is a single shape that suffices, namely the integers Z. A generalized element of shape Z of an abelian group A is just an ordinary element of A.
However, sometimes there is no single object whose generalized elements can distinguish everything up to isomorphism. For example, consider Set×Set [todo: link to a page about the product of two categories]. If we use generalized elements of shape (X,Y), then they won't be able to distinguish between the objects (2A,2X+B) and (2Y+A,2B), up to isomorphism, since maps from (X,Y) into the first are the same as elements of (2A)X×(2X+B)Y≅2X×A+Y×(X+B)≅2X×A+Y×B+X×Y, and maps from (X,Y) into the second are the same as elements of (2Y+A)X×(2B)Y≅2X×(Y+A)+Y×B≅2X×A+Y×B+X×Y. These objects will themselves be non-isomorphic as long as at least one of X and Y is not the empty set; if both are, then clearly the functor still fails to distinguish objects up to isomorphism. (More technically, it does not reflect isomorphisms. [todo: explain or avoid this terminology]) Intuitively, because objects of this category contain the data of two sets, the information cannot be captured by a single homset. This intuition is consistent with the fact that it can be captured with two: the generalized elements of shapes (0,1) and (1,0) together determine every object up to isomorphism.
Morphisms are functions on generalized elements
If x is an A-shaped element of X, and f is a morphism from X to Y, then f(x):=f∘x is an A-shaped element of Y. The Yoneda lemma [todo: create Yoneda lemma page] states that every function on generalized elements which commutes with reparameterization, i.e. f(xu)=f(x)u, is actually given by a morphism in the category.