Most could be replaced with an AC adapter wired to the battery terminals. You’d need to understand the voltage and amperage needed for each device.
Usually (but not always), something with 2xAAA batteries as pictured runs on 3v, so you could get a 3v probably around 500 mA ac adapter and wire it in and it would run. But you’d need to understand some basics about electronics and soldering to do it.