One more point...
The above code just defines the type of the block. To add it to the workspace, you will need to call:
workspace.addTopBlock(new Block(workspace, 'block1234'));
Where workspace will often be Blockly.mainWorkspace.
Unless......
You really want to add four math_number blocks to the workspace. In that case:
function addNumberBlocks(workspace, numbersArray) {
for (var i = 0; i < numbersArray.length; ++i) {
var block = new Block(workspace, 'math_number'); // Create the block
block.setFieldValue(numbersArray[i], 'NUM'); // Assign the number value
// TODO: set position using block.moveBy(x, y);
workspace.addTopBlock(block); // Add to workspace
}
}