First to clarify the situation, suppose you have assembled a PV system over time and have modules which supply 12 volts, 16 volts and 24 volts. What is the best way to connect them?
There is no simple answer to this problem. It is a matter of tradeoffs. The aim is to get as much energy as possible safely, while not misusing any system elements. The general idea is to get a near as possible to the required voltage by connecting modules in series or in parallel as befits, while keeping in mind the maximum current any module should carry.