I was just wondering: does the Torah say anything about reincarnation.
There is no direct reference to reincarnation in the Torah.
Although Rav Saadya Gaon, one of the leading early Jewish thinkers, writes that it is “foolish” to believe in reincarnation, and Maimonides makes no mention of it, the belief became popular after the wisdom of kabbalah (Jewish mysticism) became widespread, which writes extensively about reincarnations, and an entire book of the Arizal (shaar ha-gilgulim) is dedicated to the nature of reincarnation, and examples thereof.
Note that this issue should not be confused with the eternal nature of the soul, to which there is certainly Scriptural evidence (see, for example, I Samuel 5:29, and chap. 28).