Efficient Automated Implementation Of Higher-Order Many-Body Methods In Quantum Chemistry