There is a single answer that is all encompassing for this question. You want your UV unit as close to your outlets as possible. On a single outlet, we’ll use the trusty kitchen sink pictured for our example, you want the unit under the sink. Having in your loft would mean there’s more opportunity for bacteria to enter the supply through any tiny imperfection in the pipework. This wouldn’t usually be a problem but if the bacteria finds a little space to multiply in, there’l be trouble’s afoot.
For a multi outlet setup, say the whole kitchen with dishwasher, washing machine and taps, the UV unit will ideally be at the very last point before the pipe branches off to feed these separate appliances. Normally this would be under the floor so a nearby cupboard will be the usual place to put one.
If you’re looking at a commercial unit the same applies, as close to the end as possible. There are no exceptions to the rule, only more convenient solutions for the user.
I’m not going to string this out, if you’re in a particular spot of trouble just contact me.