When I had a failure of two batteries and ended up replacing the bank Injse grp29 AC Delco lead acids. They served quite well.
I am pretty sure that the grp27/29/30/31 are (nearly) identical in size and then differences lie ni capacity and post arrangement.
Most recently I installed a Trojan 30xhs set and am quite pleased.
It was a snug fit but they are nice batteries.
So, I said all that and you'll be looking at agm's but I wanted to try to answer the 'group number' part.
Measurements are readily available from almost any manufacturer's website. A secure for matters :) .