New method to convert the given parameters to a object array.