If I got your question well, I would start by getting:
- the ouput number
- the percentages you want the three letters to represent (unless it's fixed at 85 - 10 - 5)
then proceed to divide said input number by 100 and multiply it by the desired percentage, to initiate a for loop for each of the letters, populating your array (which will stay variable in size).
To represent what I got of your question in Python3:
print("please type an integer, then Enter : ")
# the following integer will be the size of your array. Here I chose to prompt the user so that you can execute and see for yourself that you can change it as you like and the solution will stay valid.
startingInteger = int(input())
print(f"the startingInteger is {startingInteger}")
print("what is the percentage of a?")
aPercentage = int(input())
print("what is the percentage of b?")
bPercentage = int(input())
print("what is the percentage of c?")
cPercentage = int(input())
array = []
for i in range(int(round(startingInteger/100*aPercentage))):
array.append("a")
for i in range(int(round(startingInteger/100*bPercentage))):
array.append("b")
for i in range(int(round(startingInteger/100*cPercentage))):
array.append("c")
print(array)
You would then need to scramble the resulting array (if that's what you mean by "random"), which should pose no problem if you import the "random" module and use the scrambled(). It's quick and dirty and inelegant but the logic is very explicit this way, hope it illustrates the idea.