Well, you have an array of with 10 horses in it.
If you want to pick 5 out of the 10 horses.
Consider what the result will be like.
1/ Do you just want 5 out of 10 horses all different? Meaning, if one horse is pick, it will be eliminated from the array.
If this is what you want, here is how I would go about this question and write code that best describe the pseudo code.
The steps may be differ, I am sure you'll figure it out.
2/ If you just want 5 random pick regardless of duplication, you can just randomly pick them with some form of repetition.
If this is what you want, like the previous pseudo code. Except no need to remove the horse from the pool.
Does that give you some hints?