I'm on my fourth E39.
Buy the cleanest one you can find.
All tourings have bags.
In the diesels, the autos have swirl flaps and egr coolers, manuals don't.
They all rust on the same spots, fuel flap and boot lid being the most regular offenders.
If it hasn't been done, budget suspension refurb, injectors, turbo, that's about 4K on its own.
Unless you're doing massive mileage I wouldn't rule out a petrol.
Sent from my iPhone using Tapatalk