Translations:Manual:SpecialWhatLinksHere.php/2/en

It uses $pagelinks, $templatelinks, and $imagelinks.