Sums of the form $\sum_{d|n} x^d$
This is not a complete answer, but here are some examples of specializations of $S(x,n)$ which do appear in the literature:
$S(1,n) = \sigma_0(n)$, the number of divisors function.
$S(-1,n) = \#(\text{even divisors}) - \#(\text{odd divisors})$. This function sends $n = 2^v m$, where $m$ is odd, to $$ S(-1,2^vm) = (-1+v)\sigma_0(m).$$
$S(\frac12,2^k) = \sum_{i=0}^k (\frac12)^{2^i}$, in the limit $k\to \infty$, is known as Kempner's number which is known to be transcendental (Kempner, 1916). I learned of this via this stackexchange question.
Question: Is it clear what happens for $S(\zeta_k,n)$, where $\zeta_k$ is a primitive $k$-th root of unity? I couldn't find a nice closed form.
Note that even though $f(n) = (-1)^n$ is not an arithmetic function, the sum over divisors $S(-1,n)$ is ''very close'' to being arithmetic: the formula given above shows that $-S(-1,n)$ is (weakly) arithmetic . I'm guessing there might be some similar sense in which $S(\zeta_k, n)$ is close to being arithmetic, but it's probably too much to hope for that the same holds for $S(x,n)$ in general (as a function of $n$).