Hi again ThirdFret! Really grateful for your reply!
I already figured it out using your formula and some index-match!!! Yey. Thank you so much. :D
Here's my output below:

Cats.png

To those who have the same problem,
first, number your cats in a separate column, say column A
second, use the formula on column D: =IF(B1="Cat","",LARGE(IF($B$1:B1="Cat",$A$1:A1,0),1))
third, use index-match to get the randomized numbers on column E: =IFERROR(INDEX($C:$C, MATCH($D1,$A:$A, 0)), "")