I tried your solution but the problem is this
Picture Marker Symbols take 'source' as the image source meaning the url of the image as input in XAML. Now I have the images in the feature layer uploaded on my ArcGIS online server, therefore I cannot retrieve the image url from there for each symbol to put into picture marker symbol.