Questions of definition:
1) How do we make sense of $X(f)$ with $X$ a vector field on $M$ and $f$ a smooth function on $M$?
One idea I have is that it is not actually $X(f)$ where we apply the vector field on $f$ but actually the canonically associated derivation. That is $X(f)$ is the following function $$ X(f):M\rightarrow \mathbb{R}:x\rightarrow X_x(f)$$
2) How do we make sense of $Xg(Y,Z)$ where $g$ is a riemanian metric and $X,Y,Z$ vector fields.
One idea is that $Xg(Y,Z)$ is the fonction defined as follows $$ Xg(Y,Z):M\rightarrow \mathbb{R}:x\rightarrow X_x\cdot g_x(X_x,Y_x)$$
To get this answered, the short answer to both questions is yes. A vector field $X$ is a section of the tangent bundle $TM$, in particular $X:M\to TM$. So $X$ maps points to vectors, and vectors map functions to real numbers.
So when people say $Xf$, they actually mean $\tilde X(f)$ where $\tilde X$ is implicitly defined as follows: $\tilde X: C^\infty(M)\to C^\infty(M)$, $\, \tilde X(f)(p):=X(p)(f)$.
The second question follows easily from this.