Global market gains over the past year were driven by a handful of heavyweight stocks, exposing the narrow breadth of the rally even as major indices scaled record highs.