Vanos + cooling are the most basic issues, other stuff is like the suspension bushings, thermostat etc
But most importantly look at the service record and what the car has been through, even if it's not for a daily driver. E39s can break at 170k or be healthy at 450k, it's really just down to maintenance. Just remember all the stories with BMW V8s
The sixes are the best in my opinion but the M62 is a powerful one!