This example from the documentation is more a trick, a way hack the fact Personalisation engine comes after Tracking processing. Even if it makes it possible to have different tracking links for reporting purpose, it comes with some limitations. It requires nested loops against your main collection you want to use for personalisation (the one attached to your recipients) and a static array of value you use to build different links (across recipients)
If your use case is just personalisation, I would recommend to not go for this pattern. Classic personalisation will lead to one single dynamic tracking link but remains optimal for delivery preparation processing. If your use case requires to breakdown your tracking links for Reporting or Retargeting purpose, then I would recommend to better look at extending The tracking table and log additional info/attributes when people clicks on the link. That way, you will have additional information to "differentiate" your links.