If your memory cells has unified instance name or module name, such as MEM_***, then you can use DC command along with TCL command to find out all the memory instance.
setp 1): use get_cells -hire * -filter "is_sequential == true" //find out all sequential cells, both DFF/Latch/Memory
step 2): use get_attribute command to find out the cell's module name or instance name
step 3): use tcl "regexp" function to match the instance name with MEM_****.