Scalable production of p-MoTe2/n-MoS2 heterostructure array and its application for self-powered photodetectors and CMOS inverters