I had learnt some grammar points where 谁 seems to introduce a subordinated phrase (those people who （谁做谁） ... and who would be 谁, now I was wondering what other functions 谁 could have.
谁 is either "who" or "whom" and nothing beyond. "Whom" happens to not be used often in English. But in Chinese, 谁 as a third person form of "who" is used often.
谁做谁 is on the strange side. But if it is used in some context, it would mean "who is whom" with "whom" potentially has the meaning "role". That is not because of 谁. That's because of 做 can be used as "to take the role of".
You've probably encountered 谁 functioning as a pronoun in questions:
你的爸爸是谁？ (Who is your father?)
这是谁的笔？ (Whose pen is this?)
你喜欢谁？ (Who do you like?)
谁知道？ (Who knows? [often rhetorical])
谁怕谁？ (Who's afraid of whom?)
In the above, you can directly replace 谁 with a person (a personal pronoun, name, etc.).
The other usage is "everyone" (usually with 谁都 or 谁也) or "whoever" (an arbitrary individual, perhaps satisfying some conditions):
谁都知道。 (Everybody knows.)
谁也需要参加。 (Everyone must attend.)
谁有能力谁做主。 (Whoever has the skills is in charge.)
我们说谁，谁就到。 (Whoever we speak of will arrive.)
我们谁也离不开谁。 (We are inseparable.)