A Versatile THz Source for High-Repetition Rate XFELs