Yes, this is possible in Photoshop.
As far as I can tell, ExtendScript treats an ArtBoard like a regular LayerSet. Do you have an Illustrator Script you are working with as a starting point?
If there are just artboards and no layersets you could try...
var count = activeDocument.layerSets.length;
activeDocument.layerSets[a].name = activeDocument.layerSets[a].layers.name;