I am trying to solve the following:
Consider a string of independent random variables taking value in the set $\{1,\dots, n\}$ with equally likely probability. Let $T$ be the smallest positive integer so that all numbers $1$ through $n$ have shown up in the string up to time $T$. Compute the expected value $E[T]$ and describe how it grows as $n\rightarrow \infty$. Let $S$ be the smallest positive integer so that at least one number has shown up in the string twice up to time $S$. Compute $E[S]$ and describe how it grows as $n\rightarrow \infty$.
Seeing that we want to compute the expected values of $T$ and $S$, they must be random variables. But how can I define $T$ and $S$, moreover, how can I relate $T$ and $S$ to the $X's$? Any help is appreciated.
This is answer is really an extended hint since, as BGM notes in the comments, the first problem is the fairly well known 'coupon collector problem' so it should be easy to find a solution by searching.
Hint for $T$: Try defining the random variable $T_i$ to be the time to seeing the $i$-th distinct number in $\{1,\dots,n\}$ after seeing the $i-1$-th distinct number. (in the language of the coupon collector problem, the time to collect the $i$-th coupon after collecting $i-1$ of them). $T_i$ has geometric distribution and you should be able to work out its parameter and hence $\mathbb{E}[T_i]$. Then $T = T_1 + \dots + T_n$ so applying linearity of expectation gives $\mathbb{E}[T]$.
Hint for $S$: $S$ turns out to be in some senses a simpler random variable than $T$ and you can easily write down a formula for the expectation. Recall $\mathbb{E}[S] = \sum_{k=0}^n \mathbb{P}(S > k)$ and then note $\mathbb{P}(S \gt k) = \frac{n!}{(n-k)! n^k}$.