Object pooling for many different Prefabs

Hi I am in thinking about pooling monsters…

For example I want to have 20 bats, 10 snails on the scene.

I know that there is no way that player will see more then 3 monsters at once (with same type like snail)
So I would like to have a pooling system for monsters:
I would only instantate 3 bats and 3 snails.
When player comes close to the monster I detect it OnTriggerEnetr2D and simply pool an monster.

That’s sounds good, but with my knowledge I would need to create an global MonsterPoolManager where I would have to makre GameObject Bats, GameObject Snails etc… I would also need to have seperate counter(pointer to index) for each of them. What becomes silly if I would have about 30 types of monsters in whole game…
I was thinking about puting all Monsters in one array and just pool them by searching in the loop by id or name, but that wouldnt be a very efficient way right? I mean if there was about 10 placeholders for monsters it would mean that I have to do the loop through all monsters array ten times… I guess it could cause lags…

What would be a shortcut for that? I feel that I don’t know something important, or I didnt come up with a proper idea…

Thanks in advance!

You could either combine the behaviours of the bat and snail scripts into one and then just have an int to define which it is, then just pool the “generic” monster (a monster with the combined behaviour) and change the int value defining the specifics of the creature just before you place it, or you could just have multiple seperate, tiny pools of each monster type for the level.

you can use a 2d array with the id of the monster as lineIndex, you will get for example

   static  enum MosterIndex = { snail, bat, raven, ....}
/*
 - make the monster id readable to in case you forget what is the index of a specific monster
 - then access to a specific type of monsters would be easier
 - if the number of monsters is different you can use a List 
  this is the simplest way
*/

MonstersArray[MonsterIndex.snail, index]  ;