Creating an bone at a locators position

Note: I already posted this on the Maya mailing list, but I thought I might get more specific answers in this forum thanks.

I'm new to mel I've done a little. But my problem is I'm trying to to create
an object at another objects location specifically a bone at a locator.

I can't decipher the best way to apply the transform of the locator to the
bone. Can I use a vector to pass the XYZ values to the bone? Or do I have to
use an array(storing the xyz values as separate floats)? Because my first
thought was to use an array of vectors, this was because I wanted to create
multiple locators and then have the bones created in the at the respective
positions. So I was going to store the locator positions in an array then
create the bones based on how many locators were in the array.

I did some testing and I couldn't use a vector stored in a variable to
create a sphere at the position of the vectors value. e.g.

vector $position = <>;
sphere -p $position -r 1 -n posSphere;

Is this because X, Y, Z transforms are individual float values and not
vectors? If so why?

Last question... I actually know how to gather these values separately but
thought it rather silly to store them as separate variables in separate
arrays and not as vectors in a single array. Can I gather transforms and
store them as vectors? If so how?

Thanks for reading all the way through this I appreciate it alot.

Regards Matt

float $locPos[] = xform -q -ws -t locator1;
joint -a -p $locPos[0] $locPos[1] $locPos[2];

presuming you have a locator called locator1....

Yes I found J schliefer's post on cgtalk regarding the same topic. I've learnt heaps there. But I'm still wondering about some of my other questions about variable types.