When it comes to humanoid enemies and NPCs, the items that they carry (weapons, armor, shields, etc.) are static in type but variable in quality. That is, a Lurker Cut-Throat will always carry a knife of some kind (shocksteel or otherwise), but the quality and economic value of that knife varies from playthrough to playthrough (unless you somehow reset the seed that generates the quality, I presume). It seems that the quality of a given weapon/armor drop will vary within a certain range, depending on the particular enemy in question, but this could just be a fluke.
Unique items are a little bit different, in that (IIRC) their quality values are static, as well.
Respawning, wildlife-type enemies obviously don't carry weapons and take their loot randomly from a pool of possible items and qualities specific to the enemy in question.
When it comes to containers like lockers, hack-able boxes, and barrels, I have absolutely no clue how the loot is determined. Sometimes it seems random, sometimes it doesn't; I imagine it's probably dependent on the specific container in question and whether or not it contains an oddity.