The SendKeys command can take an arbitrary string passed as an argument. All you need to do is generate the random string you want to be sent to the webelement using the best practices of the language you are developing in.
For instance in Python you'd generate a 6 character alphanumeric string with the following.
randstring = ''.join(random.choices(string.ascii_uppercase + string.digits, k=6))
You can read more about generating random strings in Python here