In reply to prasadaddagarla:
There is no way to store a variable type directly. If the types you want to store are classes, then you can use what is called a proxy class. See session 3 of my SystemVerilog OOP for UVM course. The UVM implements this with the umm_object_wrapper class.