We establish various new results on a problem proposed by Mahler [Some suggestions for further research. Bull. Aust. Math. Soc. 29 (1984), 101-108] concerning rational approximation to fractal sets by rational numbers inside and outside the set in question. Some of them provide a natural continuation and improvement of recent results of Broderick, Fishman and Reich, and Fishman and Simmons. A key feature is that many of our new results apply to more general, multi-dimensional fractal sets and require only mild assumptions on the iterated function system. Moreover, we provide a non-trivial lower bound for the distance of a rational number p/q outside the Cantor middle-third set C to the set C, in terms of the denominator q. We further discuss patterns of rational numbers in fractal sets. We highlight two of them: firstly, an upper bound for the number of rational (algebraic) numbers in a fractal set up to a given height (and degree) for a wide class of fractal sets; and secondly, we find properties of the denominator structure of rational points in `missing-digit' Cantor sets, generalizing claims of Nagy and Bloshchitsyn.