I would turn this question around and ask: How do people get standing arm-bars and joint locks on the arms of their opponents? Understanding how they do that will give you a good idea about how to defend against it.
Generally, in order to perform a standing arm-bar or a grapple of some sort on the arm (like a wrist grab and twist), you can break it down into the following steps:
- Capture the arm.
- Move to a proper position relative to your opponent.
- Move your grip from the capture point to the application position.
- Finally, use leverage to apply the technique.
Steps 1 and 2 are interchangeable, actually. You can capture the arm first and then move to a better position. Or you move to a better position and then capture the arm. The order doesn't matter. In practice, though, you'll probably capture first. It will just happen. And then you move into a better position.
At any point in that list, your opponent can thwart your attempts to perform the standing arm grapple. For example, in step 1, if you attempt to grab your opponent's arm, he can just flail his arms around, preventing it. Arms and especially the hands are one of the hardest things to get control of in real life. It's because they're moving around. As soon as you reach for your opponent's wrist, for example, he sees that and flinches his arms away.
So what's the solution for the capture (step 1)? One strategy is to target the body instead. The body moves around much more slowly than the arms do. So move in close to your opponent, grabbing onto his body instead (maybe grab around the back of his shoulder or neck). From there, you can slide your arms down to his upper arm, grab again, and then move into the final arm-bar position.
His counter to that, though, will be to not let you get too close. He can move to keep some distance between you and him. He can punch or kick you to keep you away. And he can counter-grapple you as you attempt to grab him.
In step 2, you're moving your body relative to your opponent's body so that in steps 3 and 4, you can move your grip to the right position and can use your body to apply leverage. So in step 2, what can mess you up? If your opponent doesn't let you move around to a better position, that would be your biggest problem. He might see you attempting to move to his side, so he pivots with you, always keeping you right in front of him. This way, you can't get into position on his side, angled away from his center line like you really want. And so you're not going to be able to get the leverage you need, and your standing arm-bar will be neutralized.
Another thing that can be done by your opponent in step 2 is to keep you preoccupied and unable to move. You may have captured his wrist, for example, but he might counter-grapple you by capturing your wrist (of the same hand you used to capture his). Your movement is restricted at this point. He may also simply take you down to the ground into a controlling position, which can reduce your mobility unless you also know ground-fighting.
Punching and kicking are also tactics that your opponent might employ to keep you from moving. They're distractions that you have to deal with. While you're defending against those, your movement is restricted. Some people deal with this by simply taking the punches and kicks, realizing that a little sacrifice is needed in order to get into a better position. And often times, just moving off center will neutralize most of the power in those strikes anyway.
In steps 3 and 4, you're in the right body position to apply leverage, and so now you're just going get into the final grip position if you haven't gotten there already, and then immediately apply the technique with the right leverage. This must happen really quickly in order to work properly. If you take any time to do this, or if your targeting or technique is off, the grapple technique (standing arm-bar for example) won't work or won't work well. Your opponent can very easily mess you up by twisting his elbow out of the plane of movement for your technique, for example. He can also drop down to reduce your leverage. He can counter-grapple you. He can move to face you, thwarting your positional advantage. He can punch your face, head-butt, or kick you in the knee. The quicker you are, the less likely there will be enough time for your opponent to change things up on you.
And finally, it doesn't end there. A standing arm-bar, for example, is not generally a technique that will end a fight. You're going to have to keep it on while your opponent is struggling to get out. Most grappling based styles show the standing arm-bar as a "demo technique" (demonstration only). How it is applied on a struggling opponent may look very different. Typically, you would continue pushing, applying leverage at the elbow and shoulder of your opponent, until your opponent falls to the ground stomach-down. At this point, you use your knee and all of your body's weight to pin the shoulder down to the ground, making it hard for your opponent to get out of it and making it easier for you to move to a better position if you see your opponent wriggling out of it. You can twist the wrist while applying pressure on the elbow and the shoulder. The level of force you apply can be adjusted as your opponent either cooperates or struggles against you, giving you a psychological advantage.
My point being, the standing arm-bar isn't the end of what you need to do. If you don't follow through with it, it will allow your opponent the opportunity to escape.
Now, given all of that, look back on what I just wrote from the position of the defender. See all of the ways you can mess up someone who's attempting to perform a standing grapple on you. And practice it. Practice it both from the attacker and the defender's perspective. Both will give you insight into its defense.
Hope this helps!