Sure, the idea behind Thomae's function easily generalizes to any countable set. Let $S\subset\mathbb{R}$ be any countable set and let $i:S\to\mathbb{Z}_{>0}$ be an injection (or more generally, any finite-to-one function). Define $f:\mathbb{R}\to\mathbb{R}$ by $f(x)=0$ if $x\not\in S$ and $f(x)=1/i(x)$ if $x\in S$. Then $f$ is continuous at a point $x\in\mathbb{R}$ iff $x\not\in S$ (the proof is very similar to that for Thomae's function).
More generally, it can in fact be shown that a subset $S\subset\mathbb{R}$ is the points of discontinuity of some function $\mathbb{R}\to\mathbb{R}$ iff it is $F_\sigma$ (i.e., a countable union of closed sets).