Hyundai Motor plans to secure rare earth metals used in electric and hybrid cars as the industry acts over a possible shortage of the minerals.