There are two classical approaches to inventory in games, and some more modern stuff.
1) Everything is in a grid.
2) Identifiers.
Cheat searching starts much the same really. Get yourself infinite gold (or enough and buy cheap items).
Any item you like then buy and sell, or use a pick up, such that the usual has changed/has not changed/greater than/less than search picks it up (
https://web.archive.org/web/20080309104350/http://etk.scener.org/?op=tutorial ).
From that you will know at the least the location of an item in memory. 999 times of 1000 then everything will be bundled together for the purposes of managing memory. Try buying/selling a different item and looking at nearby memory, repeat a few times with different items.
It should then be obvious whether it is a grid (imagine a spreadsheet, each cell corresponds to a given item count) or an identifier (so you will have a count and identifier nearby). Now you can edit savestates or use cheats to try out other locations/identifiers, and in doing so hopefully find the one you want, possibly plus hidden things, cut content and DLC all without having to do the crazy epic sidequest or hope the random number generator falls in your favour (both of which tend to only give you the one item).
There are possibly clues as to which is which from gameplay (usually infinite inventory is grid, identifiers will lack it but that is not a hard rule). Both can be in a game -- if you have a separate panel for key items then... yeah. I have seen items separate from weapons before as well.
More modern stuff can be trickier. Here items will be generated and encoded such that items are more like a traditional character stats than an item. Can also be useful in keeping things small if you have multiple effects and don't need to put a 0 for all your different elemental damages and stats (maybe you have 50 of them in total).
You can still try to find the inventory location within memory and mess with things (pick things up and put down, sell and if there is a buyback then that, trade with other player...).