in a random manner
"the houses were randomly scattered"
"bullets were fired into the crowd at random"
In a random manner.
"The guests were seated randomly around the table so that no two friends sat together."
The word randomly comes from combining the adjective random with the suffix -ly to form an adverb. It entered English as a straightforward grammatical construction rather than through borrowing or meaning shift.