Art. 45. — 1. Ari ut perepeliant praeper ferersp elessint ipsa nis sit volupta sume et, sequistio .....
Given this example: I have to generate an index which doesn't refers to the page, but to the article number(s) instead. ex. the word "praeper" should be referenced to as follows
praeper 45 (art number)
praeper 12 (page number)
Sounds like you're going to need to use cross-references.