We actually have only two cases: 1... and 2... .
In the first case, we have to fit the numbers 2,2,3,5,5,6 somehow. Imagine that we tag each of the repeated elements somehow, e.g. 2',2",3,5',5",6. If we care about the tags, then there are $6!$ possible ways to arrange the numbers. Now each untagged arrangement corresponds to $2!2!$ different tagged arrangements (consider the order in which the tags on the $2$s and $5$s appear). In total, this gives $6!/2!2!= 180$.
In the second case, we have only one repeated element $5$ so there are $6!/2! = 360$ possibilities, for a total of $540$.
In general, if we have $k$ unique elements repeated $t_1,\ldots,t_k$ times (respectively), then the answer is going to be $(t_1+\cdots+t_k)!/t_1!\cdots t_k!$, using the same reasoning. This is known as a multinomial coefficient since it appears in the multinomial theorem:
$$(x_1 + \cdots + x_k)^n = \sum_{t_1 + \cdots + t_k = n} n!/t_1!\cdots t_k! x_1^{t_1} \cdots x_k^{t_k}$$
where the sum is over all non-negative integers summing to $n$. The multinomial coefficient is sometimes denoted $\binom{n}{t_1\ldots t_k}$, although one of these numbers is really redundant. When $k=2$ we get the binomial coefficient, and we usually omit $t_2$.