Extreme points of unit ball in $C(X)$

You are quite close: don't look at $(1\pm r)f$, look at $f\pm r$ instead.

There is $\varepsilon \gt 0$ such that the set $U = \{x : \lvert f(x)\rvert \lt 1-\varepsilon\}$ is non-empty. Let $u \in U$ be arbitrary. Urysohn's lemma gives a function $g$ such that $g(u) = 1$ and $g|_{U^c} \equiv 0$. Take $r = \varepsilon g$. Then $f = \frac{1}{2}(f+r) + \frac{1}{2}(f-r)$ shows that $f$ is not extremal because $\lvert f(x) \pm r(x)\rvert \leq 1$ for all $x$.


Suppose $\varepsilon=|f(t_0)|<1$ for some $t_0$. By continuity there exists $V\ni t_0$, open, with $|f(t)-f (t_0)|<(1-\varepsilon)/2$ for all $t\in V$. Now let $g$ be a continuous function, supported on $V$, such that $g(t_0)=(1-\varepsilon)/2$ and $|g|\leq(1-\varepsilon)/2$.

Then $|f\pm g|\leq1$, and $f=\frac12(f+g)+\frac12(f-g)$, so $f$ is not extreme.

Edit: regarding your second question, it is something you already know. $C(X)$ is a unital C$^*$-algebra, so any element is a linear combination of four unitaries, by the usual trick of writing a complex number $a+ib$ with $|a+ib|\leq 1$ as $$ \begin{align} a+ib=&\frac12\left([a+i(1-a^2)^{1/2}]+[a-i(1-a^2)^{1/2}]\right)\\ &+\frac{i}2\left([b+i(1-b^2)^{1/2}]+[b-i(1-b^2)^{1/2}]\right) \end{align} $$