In axomiatic set theory one can define functions $f : C \to D$ between any two classes $C, D$ (even if one or both of them are proper classes).
Let $C$ be a proper class and $D$ be a set. Consider all constant functions $f : C \to D$. Is it legit to say that these functions form a set?
There is a $1$-$1$-correspondence between these function and the elements $d \in D$ which suggests that these functions form a set. On the other hand, these functions can formally can be regarded as product classes $C \times \{d\}$ with $d \in D$, thus they cannot be elements of a set.
Is there any variant of the axioms of set theory which allows to form a set of the above constant functions?
Moreover, I think it is okay to form the class $\mathcal C(C,D)$ of constant functions. Then we have a bijection between this class and the set $D$. It seems weird to have a bijection between a proper class and a set.
The main issue here is that the "collection" of all constant functions $C\to D$ (when $C$ is a proper class and $D$ is a set) is not even a class. Let me describe how two common theories (fail to) deal with this "collection".
In ZFC, where every object is a set, proper classes and class functions are not actually first-class objects. Instead, they are meta-theoretic objects. If I write down a property $P$, I can conceive of the class of all objects satisfying $P$, but this class doesn't exist as an object itself (unless I can prove that there is a set whose elements are exactly the objects satisfying $P$). Now given two classes (defined by properties $P$ and $Q$, I can describe a way of assignment a unique object satisfying $Q$ to each object satisfying $P$, but this assignment (called a class function) does not exist as an object itself (unless $\{x\mid P(x)\}$ and $\{x\mid Q(x)\}$ are sets). Thus "the collection of (constant) class functions $C\to D$" is not even a class, since its elements are not first-class objects. At the meta-theoretic level, we can write down a particular class function and prove it's constant. But we don't have a way of quantifying over classes in ZFC, so "all constant class functions" doesn't even make sense. And given a particular class function, it may not even be clear whether it is constant - for example, I could write down a class function whose behavior depends on whether the Continuum Hypothesis is true, in such a way that we cannot prove whether or not it is a constant function.
In NBG, both sets and proper classes exist as first-class objects, so if $X$ and $Y$ are classes, I can treat a class function $f\colon X\to Y$ as a first-class object. But if either $X$ or $Y$ is a proper class, $f$ will be a proper class, and hence $f$ cannot be an element of a class. So again, there is no object (set or class) whose elements are class functions $X\to Y$.
In both theories, the question "is the collection of all constant class functions $C\to D$ a set?" does not even make sense, because there is no such collection.
On the other hand, assuming $D$ is a set, we do have a way of talking about "the constant class function with value $d$" for each $d\in D$.
For example, in ZFC, we can use a parametric definition: the constant function $F_d$ is defined by $y = F_d(x) \iff y=d$. We can prove that for all $d\in D$, this definition gives a class function $C\to D$, and if $d\neq d'$, $F_d\neq F_{d'}$. Moreover, for each class function $G\colon C\to D$, we can prove (as a theorem schema) that if $G$ is constant, then there exists $d\in D$ such that $G = F_d$. Taken together, all this allows us to think of the "collection" of constant class functions as being in a kind of meta-theoretic bijection with the elements of $D$. We can use the elements of $D$ as definable "codes" for constant class functions, and the collection of codes is a set ($D$ itself). This will be sufficient in practice to treat the "collection" of constant class functions $C\to D$ as if it were a set.