I think I finally figured out the pattern for determining which item gets mutated/duplicated upon an encounter with a glitch in R/B. By interpolating the data from Okk's Missingno Guide on GameFAQs (
http://www.gamefaqs.com/portable/gameboy/game/907714.html) and a list of GameShark codes, I determined the algorithm for determining what will be affected by the encounter flag. It all depends on the Pok?dex, as seen below:
1-151 (hybrids): Sets the encounter flag of the hybrid species (for example, a Gengar hybrid will set Gengar's encounter flag).
152: unknown use (probably unused)
153-160: modifies the number of items held (no known glitches have this hex number)
161-168: first item
169-176: first item quantity
177-184: second item
185-192: second item quantity
193-200: third item
201-208: third item quantity
209-216: fourth item
217-224: fourth item quantity
225-232: fifth item
233-240: fifth item quantity
241-248: sixth item
249-255 and 0: sixth item quantity
Within each of the ranges, the first number listed is the least significant bit and the last number listed is the most significant bit. For example, dex 250 corresponds to bit 1 of the sixth item quantity (if you start with the LSB as bit 0 and the MSB as bit 7).
Here are some examples from Okk's FAQ verified with this general theory:
A. Missingno and 'M both have dex number 0. This corresponds to the MSB of the 6th item quantity. This means that if you have 127 or less of an item, it is increased by 128, perhaps the best known example.
B. Glitch hex 193 (Chisai-u) has dex number 205. On the chart above this corresponds to the third item's quantity. Subtracting 201 from 205 gives bit 4, the sixteens bit, which (after doing a bit of calculation on paper) is the fourth quantity bit (from the left) of the third item quantity, exactly as Okk states.
Here is a list of all the non-hybrid glitches and the encounter flags they set (with encounterable glitches in bold). Remember my bit number starts with bit 0 as the LSB and bit 7 as the MSB:
Dex 174 (bit 5 of quantity of item 1): P 4 [231], $ [240]
Dex 175 (bit 6 of quantity of item 1): g [238]
Dex 205 (bit 4 of quantity of item 3):
Japanese Symbol [193],
Pok?WTrainer[196], PC4SH [202], Chisai-u 2 [210], PkMnaPkMn f k [216], [block] [219],
p T [199]Dex 209 (bit 0 of item 4): Chisai-u 3 [242]
Dex 211 (bit 2 of item 4): [block] [236], 'v [225]
Dex 213 (bit 4 of item 4): 94 [241], 94h [249]
Dex 224 (bit 7 of quantity of item 4): h [237], 'M 2 [239]
Dex 234 (bit 1 of quantity of item 5):
.4 [194], U ? [200], M p u [211], PkMnRPkMn [217], A 2 [234]
Dex 240 (bit 7 of quantity of item 5): Blank [227], _ | _ [230]
Dex 245 (bit 4 of item 6): [block] [226], C [229], XLC [232]
Dex 250 (bit 1 of quantity of item 6):
A [191],
PkMn [197], PkMn PkMn T [208], 4h [214], PkMn 3 [223]
Dex 254 (bit 5 of quantity of item 6): $ 2 [244]
Dex 255 (bit 6 of quantity of item 6): [block] [245]
Dex 0 (bit 7 of quantity of item 6):
Missingno [many],
'M [ 0 ]Bits 0, 2, 4 of the items can be modified, which allows some, but not all of the glitch items (e.g. Surfboard, Pok?dex) to be obtained. However, there is still no way to encounter the necessary glitches in the wild so that the encounter flag can be set accordingly.
That's all for now. Yellow looks more promising (since Abwayax reported that his item changed to a Super Repel). I'll get to that a little later.
EDIT: After doing a little more research on the memory addresses, Yellow functions exactly the same way. Although I have no data to verify this theory (I don't own Yellow

), I believe the chart about can be used. Here are the yellow non-hybrid glitches in the GlitchDex.
Dex 176 (bit 7 of quantity of item 1):
3TrainerPok? [ 0 ]Dex 203 (bit 2 of quantity of item 3):
X - x [196]Dex 205 (bit 4 of quantity of item 3):
Female Symbol [193]Dex 230 (bit 5 of item 5): pPkMnp [194]Dex 250 (bit 1 of quantity of item 6):
4 4 [191]As can be seen, this means a wild encounter with pPkMnP will modify the fifth item. This makes the following items obtainable:
Helix fossil (2A) patch from Moon Stone (0A)
?????? (2C) patch from Burn Heal (0C)
Bike voucher (2D) patch from Ice Heal (0D)
Glitch items from $60 to $73 from corresponding items from $40 to $53
$E4 to $FF patch from $C4 to $DF.
I, however, still clue about Abwayax's Super Repel incident, since block [202] is a Nidorino hybrid. Hopefully we'll find out more at the end of Melchior III. If someone who actually has yellow can verify this theory, I would appreciate it.