body common control
{
      bundlesequence => {
                          "test_vars", test("test_vars.conf"),
                        };
}

bundle common test_vars
{

  vars:

   "conf[version]"
     string => "0.1";
}

bundle agent test(params)
{

  vars:

   "array_name"
     string  => lastnode("$(params)", "\.");
   "$(array_name)[version]"
     string  => "0.2";

  reports:

    Yr2013::
      "In bundle $(this.bundle) array_name is $(this.array_name) and version is $($(array_name)[version])";

}

In this example, the test bundle receives as argument a variable called params, which (must) contains the name test_vars.conf ( <bundle_name>.<array_name>) lastnode("$(params)", "\.") return the name of array.

You can use this name to define a modified test.conf array.

# cf-agent -f ./unit_lastnode.cf
R: In bundle test array_name is conf and version is 0.2