I do random treasure chests by common events. First, the treasure chest calls an event "Random Treasure" to determine what kind of contents (gold, weapon, armour or potion) is in the chest. It does this by setting a variable to a random number, and, depending on the value, calls another common event ("Random Gold", "Random Weapon, "Random Armour" etc.).
The weapons that can be found in treasure chests are in the database in a set pattern. Each type of weapon ("Sword", "Spear", "Axe" etc.) has a band of 6 weapons of that type, running from weakest to most powerful. Armour is organised in a similar way.
I use Yanfly's Message Core, which makes it a lot easier to tell the player what they found, although you could use a lot of conditional branches instead.