India and Japan have finalised an ambitious agreement that provides for cooperation in 5G technology, artificial intelligence and an array of other critical areas as the two strategic partners vowed to further broadbase their ties including in the Indo-Pacific region.