your json is not valid , so if you need the valid json like this
[{"name":"Foo","index":0,"type":"string"},{"name":"Foo","index":1,"type":"string"},{"name":"Foo","index":2,"type":"string"}]
you can use this code
var result=[];
arr.forEach( (element,i )=> {
result.push( {name:element, index:i, type: typeof element});
});
UPDATE
for your another json
var jarr=["Foo", "Bar", "John"]
you can use this code
var result = {};
jarr.forEach((element, i) => {
result[element] = { name: element, index: i, type: typeof element };
});
result
{
"Foo": {
"name": "Foo",
"index": 0,
"type": "string"
},
"Bar": {
"name": "Bar",
"index": 1,
"type": "string"
},
"John": {
"name": "John",
"index": 2,
"type": "string"
}
}