power automate microsoft flow 5000 items limit . How can I just insert 5k a time? is there a example flow for this ?

the set up is
1. grab records from some data source ( have 6k+ records)
2. put them in an array
3. insert those records into SQL server
How can i have a for loop or do until loop that basically inserts 5k records at a time so i don't hit this ridiculous limit.