How close can an electric water heater and an electric furnace be to each other?
Each appliance has a specification, available from the manufacturer, on various clearances.  This number is sometimes zero, usually not, but never more than a few inches.

That said 3 inches between the furnace and water heater does not sound risky.  Water heaters stay cool compared to furnaces: the clearance to the water softener may be the bigger deal. Your water softener counts as a 'combustible' surface.