First, welcome to the group. Let's see if we can answer that question.
Is it spring # 27 shown in this parts diagram and the arm you are talking about #39?
Parts and Diagrams for Troy-Bilt 17AF2ACP766 MUSTANG RZT 50 (2007)
If so, it looks like it has a hook at one end that probably goes into a hole to hold it in place, while the other end presses against the handle. As you suggested, it either came loose from where it is supposed to be, or one of the ends has broken off.
Is it spring # 27 shown in this parts diagram and the arm you are talking about #39?
Parts and Diagrams for Troy-Bilt 17AF2ACP766 MUSTANG RZT 50 (2007)
If so, it looks like it has a hook at one end that probably goes into a hole to hold it in place, while the other end presses against the handle. As you suggested, it either came loose from where it is supposed to be, or one of the ends has broken off.