Translation:Who are the students and who are the teachers?
In English, you do not need the second are. It is perfectly fine to say:
Who are the pupils and who the teachers?
That sounds 'literary' or 'stylized' to me (American English). So, not wrong, but not what you would ordinarily say.
No, you would not say "who the teachers" by itself. But it is OK (if rather literary) to omit the second "are" and say "who are the students and who the teachers".
This sentence has the secondary meaning of "which ones". As in I see a crowd and cannot tell the teachers from the students. Not completely sure if this is also true for the English sentence. Is it?
Yes; in fact, that's the first interpretation I would understand.
"I see people; please identify for me which of those people are the pupils and which of them are the teachers."
It could also mean "I know that there will be pupils and teachers in my course. Please give me the names of the pupils and the names of the teachers." but the "which of those people" would be more common I think.
"Who are the students and who the teachers" is correct English, if rather literary in style.
I'm not sure, would it mean something different if I said "Kik a diákok, kik meg a tanárok"?
That is only if all the teachers were Dr. Who's. :)
Interestingly, this "meg"/"pedig" thing does not work here. Very good thinking, the logic is good, but you cannot do it. Only "és" works here, where we are asking about the subject.
But the answer could do it:
"Mi vagyunk a diákok, ők meg/pedig a tanárok."
Sorry for my cultural ignorance, but I really don't know Dr. Who, so I don't understand what you meant.
It does not matter. The point was, it only works like that, "... Kik meg a tanárok.", if that "Kik" is a name. That is, if "Ki" were a person's name. Or something like that. Then you could say that the Ki's are the teachers.
"Ki" is "Who" in English.
But, in a question form, you cannot use "meg"/"pedig" like that. You connect the two questions with an "és".