Rudin's proof of Arzela-Ascoli Here is what he wrote in his Principles of Mathematical Analysis

7.25     Theorem      If $K$ is compact, if $f_n \in \mathscr{C}(K)$ for $n=1,2,3,\dots,$ and if $\{f_n\}$ is pointwise bounded and equicontinuous on $K$, then

*

*$\{f_n\}$ is uniformly bounded on $K$,

*$\{f_n\}$ contains a uniformly convergent subsequence.

Proof
(1) Let $\varepsilon > 0$ be given and choose $\delta > 0$, in accordance with Definition 7.22, so that
\begin{equation}
|f_n(x) - f_n(y)| < \varepsilon \tag{44}
\end{equation}
for all $n$, provided that $d(x,y) < \delta$.
Since $K$ is compact, there are finitely many points $p_1, \dots, p_r$ in $K$ such that to every $x \in K$ corresponds at least one $p_i$ with $d(x, p_i) < \delta$. Since $\{f_n\}$ is pointwise bounded, there exist $M_i < \infty$ such that $|f_n(p_i)| < M_i$ for all $n$. If $M = \max(M_1, \dots, M_r)$, then $|f_n(x)| < M + \varepsilon$ for every $x \in K$. This proves (1).
(2) Let $E$ be a countable dense subset of $K$. (For the existence of such a set $E$, see Exercise 25, Chap. 2.) Theorem 7.23 shows that $\{f_n\}$ has a subsequence $\{f_{n_i}\}$ such that $\{f_{n_i}(x)\}$ converges for every $x \in E$.
Put $f_{n_i} = g_i$, to simplify the notation. We shall prove that $\{g_i\}$ converrges uniformly on $K$.
Let $\varepsilon > 0$, and pick $\delta > 0$ as in the beginning of this proof. Let $V(x,\delta)$ be the set of all $y \in K$ with $d(x,y) < \delta$. Since $E$ is dense in $K$, and $K$ is compact, there are finitely many points $x_1, \dots, x_m$ in $E$ such that
$$
K \subset V(x_1, \delta) \cup \dots \cup V(x_m, \delta). \tag{45}
\label{45}
$$
Since $\{g_i(x)\}$ converges for every $x \in E$, there is an integer $N$ such that
$$
|g_i(x_s) - g_j(x_s)| < \varepsilon \tag{46}
\label{46}
$$
whenever $i \geq N$, $j \geq N$, $1 \leq s \leq m$.
If $x \in K$, $(\ref{45})$ shows that $x \in V(x_s, \delta)$ for some $s$, so that
$$
|g_i(x) - g_i(x_s) | < \varepsilon
$$
for every $i$. If $i \geq N$ and $j \geq N$, it follows from $(\ref{46})$ that
\begin{align}
|g_i(x) - g_j(x)| &\leq |g_i(x) - g_i(x_s)| + |g_i(x_s) - g_j(x_s)| + |g_j(x_s) - g_j(x)| \\
&< 3\varepsilon.
\end{align}
This completes the proof.

In his Real and Complex Analysis, he wrote

11.28 Theorem (Arzela-Ascoli) Suppose that $\mathscr{F}$ is pointwise bounded equicontinous collection of complex functions on a metric space $X$, and that $X$ contains a countable dense subset $E$. Every subsequence $\{f_n\}$ is $\mathscr{F}$ has then a subsequence that converges uniformly on every compact subset of $X$.

It the fact (and assumption) that a countable dense subset of compact metric spaces exists really necessary?
Since $\cup_{x\in K}V(x,\delta)\supset K$, (45) holds for finitely many points $x_1,...,x_m$ in $K$. Theorem 7.23 (diagonal process) shows that $\{f_n\}$ has a subsequence $\{g_n\}$ such that $\{g_n(x_j)\}$ converges for $j=1,2,...,m$, and the argument after display (45) folows.
Edit: my argument does not work because the subsequence $\{g_n\}$ is not given before the $\epsilon-\delta$ argument.
 A: Why separability?

It the fact (and assumption) that a countable dense subset of compact metric spaces exists really necessary?

When I first saw this proof, I had this exact question! If $K$ is not separable (i.e., it does not have a countable, dense subset), then (45) doesn't hold for some $\delta > 0$. To see this, we can argue the contrapositive. Assume (45) holds for all $\delta > 0$. Then for all $n \in \mathbb{N}$, we can find a finite set of points $X_n$ such that
$$
K \subset \bigcup_{x \in X_n} B_{1 / n}(x),
\quad \text{where $B_{1 / n}(x) = \{y \in X : d(x, y) < 1 / n\}$}.
$$
Take $E = \bigcup_{n = 1}^\infty X_n$. I'll leave it to you to check that $E$ is a countable dense subset of $K$.

Why separability of the metric space $X$?
In Principles of Mathematical Analysis, Rudin assumes $K$ is compact, hence implying $K$ is separable. On the other hand, in Real and Complex Analysis, Rudin does not assume $X$ is compact, but instead identifies a subsequence that converges uniformly in every compact subset of $X$. Notice the difference here. To find a subsequence that converges uniformly in every compact subset of $X$ requires considering $X$ in its entirety, not just an arbitrary compact subset (imagine $X = \mathbb{R}$, where there is no “largest” compact subset). Of course, $X$ is not necessarily compact, so we do need to require that it is at least separable.

Why your argument won't work
(Taking this from my comment below because it's important) You need the last line of Rudin's proof to hold for all $\varepsilon > 0$. Note that the choice of $x_1, \dots, x_m$ depends on the choice of $\delta$, which depends on the choice of $\varepsilon$. So if you only find a subsequence that converges pointwise to finitely many points, the last line may be satisfied for some $\varepsilon$, but not all. This should make intuitive sense because a subsequence that converges on finitely many points clearly need not converge everywhere.
