General Motors and Hyundai Motor Co. will explore cooperation in everything from passenger and commercial vehicles to electric cars and raw materials under a sweeping agreement that aims to improve efficiencies, slash costs and reach bigger economies of scale.