In reply to UVM_SV_101:
Interfaces are design level constructs which imposes some limitations on how you can index them using variables.
However, virtual interfaces are verification constructs which aren't limited to the same restrictions. You should be able to create an array of virtual interfaces, assign the array to the physical interfaces, and access the interface handle using an array index.
import uvm_pkg::*;
`include "uvm_macros.svh"
interface ram_if(input bit clk, input bit rst_n);
endinterface
module testbench();
bit clk;
bit rst_n;
ram_if intf[3](clk, rst_n);
virtual ram_if v_intf[3];
initial begin
v_intf = intf;
for (int i=0; i<3; i++) begin
uvm_config_db#(virtual ram_if)::set(null, "uvm_test_top", $sformatf("vif%0d", i), v_intf[i]);
end
end
endmodule