Actually, some heavy elements are pretty ramdom. Gold for instance, can only be "produced" from stars, unlike diamond which the planet's pressure is high enough to produce. So diamond are more closely related to tectonics.