For example, if I provide a probability array of [0.5, 0.5], both functions will sample the index [0,1] with equal probability?
Yes:
[
torch.distributions.categorical.Categorical()
] is equivalent to the distribution thattorch.multinomial()
samples from.