I would use an pre-existing library like Faker to create random data if possible. Most programming languages already have libraries like this already created. You should try to use those before creating your own. Also, they allow you to specific the length of the randomly generated string so you can test different boundaries like: 8 char, 16 char, 32 char, etc.
You can write a utility class or extend a library for any methods which the library doesn't have which are specific to your application.
Hardcoding the values in an excel sheet is okay because you can access and reuse it I guess. But one of the reasons for random testing is to find unexpected bugs. The hardcoded values are values that you thought might break a certain feature. But what happens if the feature broke in an unexpected way? Random testing is designed to increase the range of your tests by increasing the number of different input variants with minimal effort. Really good video explaining random testing.