Let me get this straight. For example, my Magnezone has Flash Cannon, if I use a charged TM, I will have a 50% chance of either getting Zap Cannon or Wild Charge. Let’s say I used a charged TM and unfortunately got Zap Cannon, do I have 100% chance of getting Wild Charge because I already had Zap Cannon and Flash Cannon before, or do I have a chance of getting Flash Cannon again?
You have a chance of getting Flash Cannon again.
Does that rule apply for fast TMs as well?
Yes, if that species has at least three possible fast moves (most species have only two).
Whenever you use a TM, it has an equal chance of giving any move other than the current one. If something has five possible charged moves, then a charged TM will give you a 25% chance of getting any of the other four moves. It has no memory, for any moves it may have previously known. The TM doesn’t cause your move to cycle through a set order, or anything.
That’s why you sometimes see advice, if you want a particular charged move on your perfect Machamp (for example), to unlock the second charged move before using a TM. Since it won’t change to either of the two moves it already has, you increase your chance of getting the good move from 33% to 50%, and you’re much less likely to just flop between two bad moves indefinitely (until you run out of charged TMs).