Distributing distinct objects to distinct boxes: What matters is which objects are placed in which box. Therefore, placing a Granny Smith and a MacIntosh in the leftmost of three boxes, a Fuji and a Gala in the middle box, and an Ambrosia and a Honeycrisp in the rightmost box is different from placing an Ambrosia and a Honeycrisp in the leftmost box, a Fuji and a Gala in the middle box, and a Granny Smith and a MacIntosh in the rightmost box.
Distributing indistinguishable objects to distinct boxes: What matters is how many objects are placed in each box. Therefore, if we have five indistinguishable oranges, placing two apiece in the leftmost and middle of three boxes and one orange in the rightmost box is different from placing two apiece in the leftmost and rightmost boxes and one in the middle box. Using your vector notation, that is, $(2, 2, 1) \neq (2, 1, 2)$.
Counting distributions of indistinguishable objects to distinct boxes: Since the problem you cited has $n$ indistinguishable objects, let's suppose we wish to place $n$ indistinguishable objects in $k$ distinct boxes. If $x_j$ is the number of objects placed in the $j$th box, where $1 \leq j \leq k$, then
$$x_1 + x_2 + x_3 + \cdots + x_k = n \tag{1}$$
is an equation in the nonnegative integers (unless it is specified that no box is to be left empty). A particular solution of the equation corresponds to the placement of $k - 1$ addition signs in a row of $n$ ones.
To illustrate, suppose $n = 12$ and $k = 6$, so we wish to find the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 + x_6 = 12 \tag{2}$$
in the nonnegative integers. Then
$$1 1 1 + 1 + + 1 1 + 1 1 1 1 + 1 1$$
corresponds to the solution $x_1 = 3, x_2 = 1, x_3 = 0, x_4 = 2, x_5 = 4, x_6 = 2$. The number of solutions of equation 2 in the nonnegative integers is
$$\binom{12 + 6 - 1}{6 - 1} = \binom{17}{5}$$
since we must choose which $6 - 1 = 5$ of the $12 + 6 - 1 = 17$ positions required for $12$ ones and $6 - 1 = 5$ addition signs will be filled with addition signs. Equivalently, the number of solutions of equation 2 in the nonnegative integers is
$$\binom{12 + 6 - 1}{12} = \binom{17}{12}$$
since we must choose which $12$ of the $12 + 6 - 1 = 17$ positions required for $12$ ones and $6 - 1 = 5$ addition signs will be filled with ones.
In the general case, we must choose which $k - 1$ of the $n + k - 1$ positions required for $n$ ones and $k - 1$ addition signs will be filled with addition signs or which $n$ of those $n + k - 1$ positions will be filled with ones, so equation 1 has
$$\binom{n + k - 1}{k - 1} = \binom{n + k - 1}{n}$$
solutions.
Selecting $n$ objects from $k$ types of objects: The related question of selecting $n$ objects from $k$ types of objects also reduces to solving equation 1 in the nonnegative integers. This is called a combination with repetition problem and yields the same formula as above.
Caveat: However, in the link, you will notice that the problem is phrased as selection $k$ objects from $n$ types of objects, which reduces to solving the equation
$$x_1 + x_2 + x_3 + \cdots + x_n = k \tag{3}$$
in the nonnegative integers. Reasoning as above, we interchange the roles of $n$ and $k$, which yields the formula
$$\binom{k + n - 1}{n - 1} = \binom{k + n - 1}{k}$$
Therefore, you have to pay attention to whether $n$ is the number of objects and $k$ is the number of boxes, as in your example, or whether $k$ is the number of objects and $n$ is the number of boxes, as in the linked formula. If you understand the derivation, you can derive the correct formula regardless of whether $n$ stands for the number of objects and $k$ stands for the number of boxes or vice versa.
Distributing distinct objects to indistinguishable boxes: The number of ways of placing $n$ objects into $k$ indistinguishable boxes if no box is left empty is the Stirling number of the second kind $S(n, k)$. If you wish to count all partitions into nonempty sets, you add the Stirling numbers of the second kind to obtain the Bell number $B_n$.
Distributing indistinguishable objects to indistinguishable boxes: This is an integer partition problem.