Some verses that bring the local warnings to global:
[Shakir 14:5] And certainly We sent Musa with Our signs, saying: Bring forth your people from utter darkness into light and remind them of the days of Allah; most surely there are signs in this for every patient, grateful one.
وَإِذْ قَالَ مُوسَىٰ لِقَوْمِهِ اذْكُرُوا نِعْمَةَ اللَّهِ عَلَيْكُمْ إِذْ أَنْجَاكُمْ مِنْ آلِ فِرْعَوْنَ يَسُومُونَكُمْ سُوءَ الْعَذَابِ وَيُذَبِّحُونَ أَبْنَاءَكُمْ وَيَسْتَحْيُونَ نِسَاءَكُمْ ۚ وَفِي ذَٰلِكُمْ بَلَاءٌ مِنْ رَبِّكُمْ عَظِيمٌ {6}
[Shakir 14:6] And when Musa said to his people: Call to mind Allah's favor to you when He delivered you from Firon's people, who subjected you to severe torment, and slew your sons and spared your women; and in this there was a great trial from your Lord.
وَإِذْ تَأَذَّنَ رَبُّكُمْ لَئِنْ شَكَرْتُمْ لَأَزِيدَنَّكُمْ ۖ وَلَئِنْ كَفَرْتُمْ إِنَّ عَذَابِي لَشَدِيدٌ {7}
[Shakir 14:7] And when your Lord made it known: If you are grateful, I would certainly give to you more, and if you are ungrateful, My chastisement is truly severe.
وَقَالَ مُوسَىٰ إِنْ تَكْفُرُوا أَنْتُمْ وَمَنْ فِي الْأَرْضِ جَمِيعًا فَإِنَّ اللَّهَ لَغَنِيٌّ حَمِيدٌ {8}
[Shakir 14:8] And Musa said: If you are ungrateful, you and those on earth all together, most surely Allah is Self-sufficient, Praised;
أَلَمْ يَأْتِكُمْ نَبَأُ الَّذِينَ مِنْ قَبْلِكُمْ قَوْمِ نُوحٍ وَعَادٍ وَثَمُودَ ۛ وَالَّذِينَ مِنْ بَعْدِهِمْ ۛ لَا يَعْلَمُهُمْ إِلَّا اللَّهُ ۚ جَاءَتْهُمْ رُسُلُهُمْ بِالْبَيِّنَاتِ فَرَدُّوا أَيْدِيَهُمْ فِي أَفْوَاهِهِمْ وَقَالُوا إِنَّا كَفَرْنَا بِمَا أُرْسِلْتُمْ بِهِ وَإِنَّا لَفِي شَكٍّ مِمَّا تَدْعُونَنَا إِلَيْهِ مُرِيبٍ {9}
[Shakir 14:9] Has not the account reached you of those before you, of the people of Nuh and Ad and Samood, and those after them? None knows them but Allah. Their messengers come to them with clear arguments, but they thrust their hands into their mouths and said: Surely we deny that with which you are sent, and most surely we are in serious doubt as to that to which you invite us.
If He wills, He can do away with you, O people, and bring others [in your place]. And ever is Allah competent to do that. (4:133)
And your Lord is Rich (Free of all wants), full of Mercy, if He will, He can destroy you, and in your place make whom He will as your successors, as He raised you from the seed of other people. (6:133)
Have they not seen how many generations We destroyed before them which We had established upon the earth as We have not established you? And We sent [rain from] the sky upon them in showers and made rivers flow beneath them; then We destroyed them for their sins and brought forth after them a generation of others. (6:6)
If Allah were to take mankind to task for their wrong-doing, he would not leave hereon a living creature, but He reprieveth them to an appointed term, and when their term cometh they cannot put (it) off an hour nor (yet) advance (it). (16:61)
The final verse is clear, that God has respited humans, and he wishes to have mercy on them, but there will come a ultimatum for them, and when that comes, if they disbelieve, they will be destroyed.
Whoever is guided is only guided for [the benefit of] his soul. And whoever errs only errs against it. And no bearer of burdens will bear the burden of another. And never would We punish until We sent a messenger.(17:15)
Finally there is this promise as well, which is clear and has not happened, but will happen if humans disbelieve:
Sahih International: And there is no city but that We will destroy it before the Day of Resurrection or punish it with a severe punishment. That has ever been in the Register inscribed.
Pickthall: There is not a township but We shall destroy it ere the Day of Resurrection, or punish it with dire punishment. That is set forth in the Book (of Our decrees).
Yusuf Ali: There is not a population but We shall destroy it before the Day of Judgment or punish it with a dreadful Penalty: that is written in the (eternal) Record.
Shakir: And there is not a town but We will destroy it before the day of resurrection or chastise it with a severe chastisement; this is written in the Divine ordinance.
Muhammad Sarwar: The decree that all the towns were to be destroyed or afflicted with severe punishment was already written in the Book before the Day of Judgment.
Mohsin Khan: And there is not a town (population) but We shall destroy it before the Day of Resurrection, or punish it with a severe torment. That is written in the Book (of our Decrees)
Arberry: No city is there, but We shall destroy it before the Day of Resurrection, or We shall chastise it with a terrible chastisement; that is in the Book inscribed.
(17:58)
The verse 17:58 keeping in mind Quran and other verses about how God punishes and he doesn't punish without a Messenger, shows, there will be a global Messenger who will display miracles to the whole world, such that, there won't remain a town or city, but will be destroyed if they continue their oppressive ways.
This Messenger however per 33:40 is not a Nabi, and hence, we see the concept of the Mahdi emerging. A person who God sends to revive Islam but not bring a new revelation, but revive the Quran and bring about the true interpretation of Quran.