The Value parameter can be a code block.
Something like this
New-VIProperty-ObjectTypeDatastore-Name_DSDiskNames_-Value { param($ds) $disknames=$ds.ExtensionData.info.vmfs.extent|%{ $_.DiskName
} [string]::Join(',',$disknames) } -Force|Out-Null
Get-DatastoreMyDS|SelectName,_DSDiskNames_
There are a couple of samples in VIProperties.