Returning Function Calls from an Array within a JavaScript Function
Normally, is a good practice create sub functions instead of add all on an array.

var button = function() {

};


Always use var in front of the variables to scope to the context. (good practice).

A good choice is take advantage of the evaluation of data types on javascript, for variables.

var variable = paramValue || "defaultValue";


this evaluates paramaValue, if is true, is assigned, if not, assign "defaultValue"

Also, if is possible, considere use a template engine like:


http://handlebarsjs.com  
http://mustache.github.io


Final Code