I think Ze Kaiser is right; if you want some kind of United States-esque organization, basically the only way to do it in the Spanish New World is via the almost total extermination of the native population. Various native groups like the Aztecs, Incas, Maya, and Amazonian tribes are simply too culturally distinct to easily be brought into a unitary government without some kind of massive outside force. Eliminating the original population means that the Spanish could move in a culturally homogeneous colonial population, that would probably hang together longer. Later on, regional cultural differences would of course arise, just as they did in the United States, but other than complete genocide, it seems unlikely for a single unitary state to arise out of the Spanish colonial empire.
I don't think that's necessary, nor that's a pre-requisite for a Spanish American Union. IOTL, the Spanish were able to impose a uniform religion, language and culture throughout Spanish America without exterminating the natives.
Native influence played no roll in the way countries were formed: the mayans are both in Mexico and Guatemala, Quichuas are in Perú and Bolivia, Guaranis are mostly in Paraguay, but live also in Corrientes, Argentinas. Countries like Mexico comprise to very different precolumbian ethnic backgrounds: Mayans in the South and Nahuatl-speaking peoples in the center, and Bolivia comprises Quichua/Aymara in its western highlands and Amazonian groups in the East.
And this hasn't been a significant problem*, as it happened in the Balcans or in Modern Africa. Why? Because the Spanish were able to impose a common culture that goes over this previos ethnic differences. There are regional differences between countries in South America, but thay aren't necessary related to the fact that different precolumbian groups once lived in the different countries, and they don't coincide with this differences.
*Bolivia did had secessionists movements in 2006, but thy had to do with other reasons