Is there any way to mark a special item as installable in any industry that outputs commodities? Ideally, I'd just be able to use a API method for this, because I have something specific in mind, e.g. it should be installable in anything that either produces commodities or outputs production capacity.
Sortof? You can make a special item that is installable in a specific list of industries, via tags in its special_items.csv listing. See, for example, the sigma matter items in Dassault-Mikoyan Engineering.
However, that works only for vanilla industries;* it won't automagically be installable in mod-added industries. And that's probably a good thing; for example, the Shadowyards mod has a special Heavy Industry replacement industry that takes and consumes installable items to specialize itself; if you gave it an installable item it wasn't expecting - well, you might get a game crash, and you'd almost certainly get unexpected behavior.
* Edit: To clarify, yes, you could put a mod-added industry on the list. But you'd have to explicitly add it, which implies that you know about that industry and have tested the interactions with your installable item, rather than getting potential untested interactions with some random industry you've never heard of before.
Edit2: Also, if you want AI-controlled colonies to have proper item upgrade behavior for items installed in vanilla industries, there's a MagicLib module for that. Getting that working was surprisingly annoying. Again, see DME's Sigma Matter for an example of the module in use.