Text this: A flexible optimization framework for transcranial electric stimulation, temporal interference stimulation and tumor treating fields