A really ugly and not recommended way is to just put the objects into the array multiple times based on the odds you want. So so if you wanted object 1 to have a 50% chance, object 2 to have a 30% chance, and object 3 to have a 20% chance, you could make a 10 object array and put object 1 in 5 times, object 2 in 3 times, blah blah blah and then just call random on it.
Maybe slightly better is to just get a random number from say… 1-10. And then do an if statement and define your odds there… if randomnum >= 1 and randomnum <= 5 spawn object 1, else if blah blah blah.