Q:

Array of TextFields with Titanium

I need to put a 6x10 cell matrix onscreen. I've figured out that I can create an array of textfields, How can I assign values to top and left for each element?
Edit for clarity:  I need to display these cells in 10 rows of 6 cells each. 
var textFields2 = [];
for (var i = 0; i < 59; i++)
 {

    textFields2[i] = Ti.UI.createTextField({
        borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
        width : '30dp',
        height : '45dp',
        //value : '',
        top : '5%',    // starting row 
        color : '#000000',
        left   : '0%'  // starting column 
    });
 }

A:

Well, to do anything you need to add them to a container. You also need to set the widths and heights correctly so they fit on the screen, ten rows of 5 textfields means that each textfield has to have a height of 10%, and a width of 20%. Then you can make use of the horizontal layout property to create the grid.
Here is a mostly self contained and probably not bug free example:
var main = Ti.UI.createWindow();

var container = Ti.UI.createView({
    layout : 'horizontal',
    horizontalWrap : true, // this is the default
    width : Ti.UI.FILL,
    height: Ti.UI.FILL
});

// Set this and then calculate below
var rows = 10, columns = 5;

// Define the base attributes of a textfield
var baseAttrs = {
    borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED,
    width : (100 / columns) + '%',
    height : (100 / rows) + '%',
    color : '#000000'
};

// Add textfields to the container with the base attributes
for(var i = 0; i < rows * columns; i++) {
    var tfield = Ti.UI.createTextField(baseAttrs);
    // Set an initial value
    tfield.value = i;
    container.add(tfield);
}

// Add container and open the window
main.add(container);
main.open();

