Custom Elevator Flaps

Would it be possible to use Lua to add flaps to the elevator output similar to the way flaperons work? I have a tandem wing configuration and flaperons are great for the ailerons but I need the same functionality on the elevators as well. It looks like I would need to increase the PWM of the elevator channel yet still allow it to move.