I think it could work if you do this way:
Array1 contains all possible prefixes
Array2 contains all possible suffixes
Array3 contains all weapons
Array4 starts empty
When the enemy drops a weapon, gamble for a random weapon from Array3, at a 50% chance, gamble for a prefix from Array 1 and a suffix from Array2
Store those results on Array4. So Array4 would look like this:
1,1:Sword
1,2:Dark
1,3:of Doom
And on your inventory system, call for the weapon n# 1 from array 4 and that will be "Dark Sword of Doom"
But that's just the tip of the iceberg of course...
If you want, look for "LoD Kompendium v12" on google, they have the complete information on how D2 drop mechanics work, and a lot of other stuff too