Peru as in post-independence Peru, or Peru the entity that can claim descent from the Viceroyalty of Peru, or Peru a post-Spanish state centered in what's OTL Peru that happens to share overlapping borders with OTL Peru?
If you want a legitimate Great Power some time during the era of Great Powers(so up until the world is unipolar or bipolar like post-WW2) then I think you have to go back way before independence. Speaking as a Peruvian: OTL Peru's lands at post-independence simply aren't suited for a Great Power IMO, no matter what type of hyper-effective government you set up there. I'm going to highlight a few of the imminent problems that Peru faces at independence between it and being considered a Great Power and this is while also ignoring governance entirely; this is all about the facts on the ground:
* Poor resources for traditional industrial development: no coal of note, steel needs to be imported. Limited resources for electrical power
* Timber resources are sparse outside of the jungles which have notable difficulties for access and transportation
* Land is owned by oligarchs and focused on money crops. Food is not plentiful for most of the populace despite the availability of land for farming, which hampers demographic growth
* Continuing the above, many lands remain underutilized or depopulated; for example the northern Andes have been a shadow of their former selves since the times of Atahualpa and have never recovered their productivity even to today
* No soft power to speak of; Peru went from being the center of Spanish power in South America to losing the ability to govern the vast majority of the old lands of the Inca. Lost Bolivia despite shared sentiments for unification due to mismanagement. Chile broke away despite being demographically dwarfed for most of its history because of an inability to properly govern or appease the locals
* No naval tradition worth speaking of; trade restrictions by the Spanish for most of Peru's history meant that trade between different colonies was controlled by foreign countries
There's two options really, a PoD before the conquest, and a PoD after the conquest. I'm going to tackle a pre-conquest PoD because that's my bread and butter at this point.
I think a better start would be a slightly delayed Spanish conquest of the Inca; instead of arriving the day after the end of the Inca Civil War, they're delayed by several months to the point that Atahualpa has stepped foot into Cusco and brought the Inca nobility in line, dealt with the traitorous vassal states such as the Chachapoya, etc. So come the Spanish, the Inca are able to raise a (relatively) fresh army to face the Spanish and instead of an outright conquest, only a coastal strip is seized and the Inca are effectively reduced to a Spanish tributary as it's deemed unfeasible to overrun the Inca; they're too homogeneous, too unified. Unlike the Aztec the Inca did an extremely good job of crushing dissenters and colonizing their lands with Quechuas. There's no traitorous Cuzcan nobles bitter from the Civil War, no Chachapoya to side with the Spanish. Quito is still 'Incan' but effectively ran by the Spanish conquistadors and later Spanish traders.
Over the coming decades the Inca are turned into a Spanish economic puppet such that while the Sapa Inca is considered untouchable(now that he's converted to Catholicism and all) the Spanish are essentially usurping Inca institutions of governance to suit Spanish interests rather than the entire system being toppled. Think of the end results essentially being the Inca version of the Japanese Shogunate. The (unofficially) Divine Emperor who's all but powerless at the head of a state that's being run by a Spaniard Shogun(the Viceroy of the Inca). No Peru here, as the Inca state isn't formally partitioned and the bureaucracy still nominally runs most everything except for Quito and OTL's Lima/Callao. It's just that the bureaucracy also has a sizable number of Spaniards with disproportionate influence.
Potosi, rather than simply being pumped for silver, is trading the silver for Spanish goods. The Spanish have plenty that the Inca want, and the Inca have plenty that the Spanish want so the trade is profitable and suits the Spanish just fine in the end. To fulfill demand for these trade goods the Spanish aren't just producing goods in Spain, they're producing them in nearby colonies such as Mexico and Colombia too.
I'm not going to go into this more because at this point, I've written five variations of the same idea in the past and they're there for anyone that wants to read them from my post history. Mestizo state at independence that has the Inca's soft power and the legitimacy of 400 years of continuous governance. Tl;dr is that an eventual Great Power arises due to this state keeping relative technological parity with the West and remaining a part of its cultural sphere, while having the demographic weight to shift a lot of trade to the South Atlantic and Southeastern Pacific, making the entire region more prosperous as a collective. Lots of soft power due to having a distinct culture that's been heavily involved with Western intelligentsia and has partaken or even innovated its own artistic and ideological movements. Quechua is a prestige language even if heavily local to OTL's Latin America plus some parts of the Pacific. Eventually developed a decent naval tradition and has a sphere of influence over a decent chunk of Oceania and the western seaboard of the Americas. This state is most definitely NOT Peru however, just ATL analogue that fills the same spot on a map but has a completely different role.
So there's that approach. The other approach is to have PoD after the conquest but before the independence because I'll stand by what I said earlier; Peru at independence couldn't possibly hope to be anything more than a regional power.
So let's imagine ATL Bourbon Reforms that instead of setting up independent Viceroyalties, decided to dissolve the Viceroyalty of Peru from being a top-managed operation to a large number of regional administrative units. These regional administrators all report to the Viceroy of Peru, with Peru being understood to be a supranational term that while yes, applied roughly to the area in the Central Andes where Lima and Cuzco were in, also applied to the entirety of Spanish South America. The Viceroy of Peru is not the Governor of Lima, and is strictly responsible for governing the entirety of the Viceroyalty of Peru as a collective. These administrators send representatives to the Viceroy which act as a cross between a parliament and a cabinet to the Viceroy. Down the line a particularly liberal Viceroy decides to formalize the powers of the governor's representatives into a legislature with limited rights.
Governorships would be centered around singular cities and their surrounding hinterland. For example Peru; you can chop up Peru(bar the jungle provinces) into six or so governoships centered on Lima, Cuzco, Arequipa, Trujillo, Chiclayo, and Piura(you can probably squish the last three into two on some form of division). You can split Ecuador into two governorships centered on Guayaquil and Quito. You can split Bolivia into governorships centered on La Paz, Cochabamba + Oruro, Santa Cruz, Sucre + Potosi, and Tarija, etc. I'm also presuming that this butterflies the Tupac Amaru rebellion, leaving most of the Inca nobility intact.
End goal, you get some degree of familiarity with most of South America being governed by Lima. Now I'm not expecting this to last. I'd expect Colombia + Venezuela, and Buenos Aires + Montevideo to break away. What I would expect however, is for areas like Ecuador, Chile, Bolivia, and most of Argentina to stick along post-independence in a federal state of sorts called Peru, assuming decent amounts of competence from the leading independence figures. Chile, Ecuador and Bolivia would be well-entwined with OTL Peru and each other at this point and unlikely to seek to break away barring incredible incompetence and overbearing entitlement from the Peruvians in trying to throw away the established system for a Peruvian-dominated unitary state or something along those lines.
Without the Tupac Amaru rebellion of OTL, then the prestige of many native institutions and families is maintained, and the Inca Empire's legacy is fresher on the minds of many of the leaders of independence. There'd be a soft pressure to conform with the borders of the old Inca Empire with most of its component regions already marginally federalized from pre-independence. There'd also be valid candidates for the more romanticist monarchists to present an Inca claimant should the state become a monarchy, as OTL Argentina considered. Anyways. The long and the short of it is that there'd be a lot of push to keep the whole thing united versus OTL, and the end result would be a state that would dominate South America, have dipped its toes into representative government, and presumably be accustomed and successful in tackling economic problems(OTL's original purpose of the Bourbon Reforms).
As to how most of Argentina goes along for the ride, when your choices are loose federalism from Lima which already exercised a soft touch versus rule from Buenos Aires where it seeks to dominate the state, the choice is pretty straightforward. Sure there's some benefit of hindsight here but I don't think the local notables would be blind to what breaking away with Buenos Aires would result in and what they'd be giving up. Meanwhile, the lack of support for independence in the rest of OTL Argentina might actually cow Buenos Aires into sticking with this ATL Peruvian Confederation. Hell, you could even have individual regions from OTL's countries decide to stick with the Confederation anyways, like perhaps Panama and Andean Colombia in a best-case scenario because they're tied more closely economically to the rest of Latin America.
End result, 'Peru' ends up looking like the Spanish equivalent of Brazil with few of the individual colonies going their own way and has the demographic base, internal stability, and (most) of the natural resources to succeed. Is it not really Peru as outlined by the OP? Yep. But I'll stand on this hill, Peru at independence, even united with Bolivia, couldn't hope to be more than a regional power.