Inifinite enemies sounds like… a lot. lol There’s really no way to spawn more than the engine can handle, but you can still spawn enough to look like it’s infinite so long as the enemies are disappearing/dying.
To rephraze what acid said in a less haunting tone:
Have you tried writing such a code yourself? If not, please do try. If so, or after you have tried, please post the code so we can help correct any errors and help you learn.
Anyway,
it would also be of help if we knew what language you are writing the code in.