Scalable on-chip generation and coherent control of complex optical quantum states