Yes, and it is more welcome than you might expect.
There is no rule requiring you to have a prior relationship with someone before sending them a letter, postcard, magazine, or commissary funds. Facilities process mail and deposits based on the inmate's name and ID number, not on the sender's relationship to them. You can send anonymously if you prefer, and many people who reach out to strangers inside choose to do exactly that.
The need is real. A significant number of incarcerated people have no outside contact at all. No letters, no visits, no money on their books, no one on the outside who knows or cares where they are. For those people, something as simple as a postcard from a stranger who took the time to write is not a small thing. It is evidence that they have not been completely forgotten by the world outside those walls, and that evidence matters more than most people on the outside ever get to see.
If you want to send mail, InmateAid makes it straightforward. You can browse the database, select someone, and send a letter, postcard, or photo without needing any prior connection. A magazine subscription is particularly meaningful because it keeps arriving month after month without requiring you to do anything after the initial setup.
For commissary deposits, the process runs through whatever platform the facility uses, JPay, TouchPay, or similar services. You would need the inmate's name and ID number to direct the funds correctly.
The impulse to help a stranger in a difficult situation is a good one. Act on it.