WFLY-1658 Fix handling of metadata on EJB  methods which accept arrays as parameters

The commit here fixes the issue reported in https://issues.jboss.org/browse/WFLY-1658 where we weren't correctly handling methods which accept array parameters. The commit also includes a testcase to test this fix.

P.S: We'll need a TCK run against this change.