Functional control of anomalous reflection via engineered metagratings without polarization limitations