You need to instantiate an array of interfaces and not "virtual interfaces". I am assuming that you have an array of intefaces that you are trying to connect to an array of VIP masters/slaves. Your original code instantiating array of interfaces is correct.
The problem appears to be resolving the my_if instance handle in the uvm_config_db::set() call.
Try the following:
uvm_config_db#(virtual test_if#(.MY_PARAM(4)))::set(uvm_root::get(), inst_name, "vif", tb_top.my_if);
By the way, I dont have access to VCS. So let me know if this fixes your problem.