Instantiate a Javascript Object from an array of arguments