Generation and controllable switching of superradiant and subradiant states in a 10-qubit superconducting circuit