We have developed a rigorous computational technique to compute exact analytic expressions for a number of distance-based topological indices of chemical graphs. There are two main advantages of our technique over existing techniques of similar nature: first, our technique is significantly diverse as it also covers the Wiener index and eccentricity-based topological indices besides Szeged-like indices, and secondly we have considerably reduced the algorithmic and computational complexity in comparison to previous techniques. Our proposed technique generates certain vertex and edge partitions of a graph which are essential in computing the exact analytical formulas of distance-based and eccentricity-based indices. To ensure the applicability of our technique, we have computed various distance-based and eccentricity-based topological indices for certain infinite families of polyomino chain system. Moreover, we _find analytical exact expressions of certain degree-based topological indices for these polyomino chains. These topological indices can be obtained as a by-product of our technique.