Two different applications of grounding. You ground the PV frames with wire back to inverter. You don't ground the PV wires.
All equipment chassis, PV panel frames, AC outlets in the house should be grounded. Wired together, connected to a ground rod, to metal pipes and reinforcing steel/bolts of foundation. That ensures anything you touch doesn't give you a shock.
Then, there is grounding of current-carrying electrical conductors.
Old 6V cars used to have battery positive "grounded" to frame of the vehicle. Today, negative is connected to the frame instead (avoids enhancing corrosion.)
House wiring, the white "neutral" conductor is bonded to ground wires at just one point, typically utility service entrance or where main breaker is located.
PV arrays in the past had negative lead grounded. For some, PV+ was close to +600VDC. Some brands/models, it was better that positive be grounded and PV- was close to -600VDC.
Often, this grounding of PV+ or PV- was done through a 1A fuse or breaker. A short anywhere else blows the fuse, voltage appears on the wire, and inverter shuts off. "Ground Fault" detection.
Common these days is ungrounded PV array. The frames are still grounded, but neither PV+ nor PV- is grounded. This is done due to how high frequency MPPT is designed. For grid-tie inverters, PV+ is around the highest positive voltage of AC wires and PV- is around the most negative AC wires.