Flash drive. There's a number of flash drives that autoexecute when inserted into a computer. These are a known vector for software infections.
As far as I know, ram doesn't generally hold memory after it's been powered down. Ram sticks don't make sense as a vector for a virus as far as I can tell.
RAM doesn't hold memory very long after it's been powered down, but be aware that it doesn't forget everything immediately.
What if you were to create RAM sticks with a small amount of flash and a controller onboard, and then swap these with generic RAM sticks?
That would require direct physical access, and if you had that there's a lot of much easier ways to root a box.
You could put data on there, sure, but typically the OS won't try to execute garbage data left over from a previous boot - it'll just get overwritten. I suppose you could have it swap out data after boot, but there are easier ways when you have physical access.
"Memory stick" is generally synonymous with "flash drive" or "usb stick" or "thumb drive"...
I know. I just hesitate because "memory" in my field almost always refers to RAM.