I know Portugal tried to integrate her colonies, both with the United Kingdom of Portugal, Brazil, and the Algarves, and later by making them overseas provinces in the 1950s, and I know that France tried something similar with the French Union around that time, but did the Spanish Empire ever attempt to annex/integrate her massive colonial empire in the New World or in Asia?
Not an expert, or detailed answer but here is this : Spain, since even before the unification of the Crowns of Castile and Aragon lived with a sort of combined state structure where the conquered areas were considered as kingdoms. E.g. The kingdom of Aragon was actually considered the union of four Kingdoms : Aragon, Catalonia, The Balearic Island and Valencia : The former two were classical dynastic unions, the later two by conquest.
The Spanish Empire started just after the unification of the crowns, but although it was most successful and impactful on the New words, people tend to forget that the Spanish expansionism started before the Unification. Castile was looking for a foothold in the Atlantic (The Canaries, occupied in the 14th century), while Aragon was expanding towards the Mediterranean (Sicily and Sardinia). After the unification, the first targets for their expansion was Italy and the Maghreb, while the first inroads to the Americas were made mostly by private enterprises.
Now in Italy there were two viceroys (not in a hereditary sense but rather as in vice president) one in Sicily and one in Naples, represented the interests of the Spanish Crown, while Milan was more in a personal union with the King. Attempts were made to integrate the Netherlands to the Empire (one of the main reasons of the Dutch Revolt), but they kept their institutions apart. Which is not surprising since Spain itself was in reality a federation of Kingdoms each with its traditions, laws and institutions.
The vice royalty system was introduced into the Americas as well (Vice Royalty of Peru, Of New Spain), with other compliments to the system. In the Maghreb however, the Spanish endeavor was rather a failure, and the Spanish didn't manage to control except some towns and fortresses on the coast, most of which they lost before the end of the 18th Century, except for the cities of Ceuta and Melila.
So the last two cities, along with Canaries, are now full administrative Autonomias like the other provinces of Spain.