Neither a sample nor a population can be considered variables. I think measurement is the missing piece of the puzzle in your question.
Strictly speaking, a sample is considered random when every element in the population has an equal chance of being sampled (simple random sampling) or at least a known probability (random sampling in a broader sense).
The "randomness" in random variable has more to do with the fact that you're measuring things that vary and that you can't know in advance what their value will be.
Now for the sample space, for tossing a coin it is just {heads, tails}, but when you are measuring a person's height for instance, the sample space is all the heights a human being could possibly have (sample space of infinite size theoretically -- even though not practically), no matter what your population (or sample) size is. Edit I realize there is room for debate on that specific point and some prefer considering the sample space as the height of all individuals in the population.