This paper presents a two-part study focusing on the optimization of pin-fin arrays for gas turbine blade cooling. The first part of the study examines the thermal performance of various pin-fin shapes and sizes using computational fluid dynamics. The study investigates circular, elliptical, hexagonal, and rectangular cross sections, with emphasis on the hydraulic diameter and Reynolds number. Two-dimensional simulations mimicked a confined, staggered array of uniform-sized pins under different inlet conditions. For a hydraulic diameter of 0.053 m and a Reynolds number of 5500, the rectangular pins showed the highest Nusselt number 8.98, 16.01, and 20.62% larger than circular, elliptical, and hexagonal pins, respectively, but also a pressure increase 68.30% higher on average. For a hydraulic diameter of 0.046 m and a Reynolds number of 1000–15,000, it was shown that all shapes have an exponential increase in pressure and a logarithmic decay in the Nusselt number. Standing out was the rectangular shape, which, at a maximum Reynolds number of 15,000, had a pressure increase of 108% larger than the next in line, the hexagonal pin. In the same range of inlet conditions, the Gee–Webb coefficient was the highest for the circular pin, which was selected as the main shape for the following segment. In the second part of the study, a machine learning framework based on a neural network architecture is presented. The neural network predicts the thermal performance of different pin-fin array configurations. At the end, this framework is used in an optimization process that explores the advantages of nonuniform arrays consisting of differently sized circular pins as opposed to the standard uniform structures of the first part. The model proves to be capable of accurately predicting the characteristic thermal performance coefficients across a wide range of input parameters. The nonuniform array managed a 23% reduction in pressure rise at a 0.2% exit temperature increase compared to a reference standard array of the same hydraulic diameter.