Let's assume you have an array filled with the all the possible characters on it's X axis. In pseudo-code:
Var Name = ""
For Loop: from 1 to However many characters you want the name
Add Array.at(floor(random(Array.Width))) to Name
If it were me, I wouldn't use individual letters, I would set up a system that alternates between consonant groups (e.g. str,th,v,gh,s,wr,r,ph) and vowel groups (e.g. a,ou,ea,ay,oo,ai). It's more work, but yields more natural results.