However, what if I want to be more specific?
I don't believe you'll find a general algorithm for solving such problems, you tackle each on its own.
What if I want all the cards to have the same/different rank(s)?
For each of the 13 different ranks you have 4 available cards.
How many ways are there to draw 3 cards of the same rank? Answer: 13 times the number of ways to draw 3 cards of any specific rank. Which means, $13 \times \binom{4}{3} = 13 \times 4 = 52$.
The question about different ranks needs a different solution. You need to choose the 3 different ranks first, and then select one of the 4 available cards for each selected rank.
For the first choice we have $\binom{13}{3}$ ways, and for each of the three ranks you have 4 possible cards. In total, $\binom{13}{3} \times 4 \times 4 \times 4 = \frac{13!}{3!\times10!}\times 4^3=18\,304$.
It might help if you compare the strategies we used:
- For same ranks, we first choose a single rank and then choose 3 cards.
- For different ranks, we first choose 3 ranks, and for each rank choose a single card.
Now I'll answer your comment's question about the ways to have 2 cards of the same rank and 1 of a different one.
What you suggest, $\binom{13}{2} * 4 * 4 * \binom{13}{1} * 4$, does not really count what you want.
With $\binom{13}{2}$ you choose 2 different ranks, then $4 * 4$ gives you a card from each one, and then $\binom{13}{1} * 4$ chooses a single card at random from the entire 52-card deck, without considering that the previously drawn cards are out of it.
I.e. your expression solves "How many ways are there to draw 2 differently ranked cards from a single deck and a random card from a different deck".
You want to solve "How many ways are there to draw 2 cards of the same rank and a card of a different rank".
For this, you need 2 ranks - one for the two equally ranked cards, and one for the third. You may think $\binom{13}{2}$ works, but this gives you two "unordered"1 ranks, which means that "a King and a Queen" and "a Queen and a King" count as the same draw. However, we assign meaning to the first and to the second rank - one will have 2 cards, and the other only one. So the actual number of ways to choose the 2 ranks here is twice as big as $\binom{13}{2}$.
Finally, choose the two same-rank cards $\binom{4}{2}$ and the third one $\binom{4}{1}$. In total you get $2 \times \binom{13}{2} \times \binom{4}{2} \times \binom{4}{1}$, or $3744$.
1 If someone finds a better term, please share it.