Text this: Generalized Perturbations in Modified Gravity and Dark Energy