Azhar was always a top class Test batsman; now he is opening which suits his game.
I think, comparison with the other 4 isn't fair. It could have been, when he was batting at 3 - he was comfortably a rank or 2 below; but in last 10 Tests, he has opened & played innings like 139, 49, 30*, 302*, 79, 91, 67, 75, 203*, 55*, even a 31 in 4+ hours - these are outstanding efforts overall for an opener, more importantly, for an Asian opener - 7 of those 10 Tests are outside Asia (but not in Zim/WI). And, he has an unbeaten triple & double, which indicates once set, he is really difficult nut to crack. If he can continue such form for 2/3 years he'll end up as a cricket great.
Advantage that Cook had is he played almost 140 Tests in 10/11 years - had Azhar got the chance to play 35-38 Tests in his best 2/3 years; he can easily score another 12-18 hundreds. Besides, 4/5 Test tours help batsmen more than bowlers - they get acclimatized with the condition while bowlers get burnt out, that's why often better batsmen or batsmen in form piles up big scores in 3rd, 4th & 5th Test, which Azhar will never get in his life unless earthquakes crashes PCB to 10 feet under ground.
I sincerely hope that he is not burdened with Captaincy, rather allowed to play with complete focus on piling runs.