arcgis javascript api create heatmap with graphicslayer

I have some client side graphics and each graphic has different kinds of fields (attributes). Is there a way to create a heat map based on these graphics? I know I can probably use feature collection object and create a feature layer based on the feature collection, but what if in my graphics, they have different fields (attributes)? Is it still possible to create a feature collection for these graphics? Is there any examples? Thanks!

It also allows you to specify the attribute field to use for point weights. If you want to keep your original feature layer, you probably need to clone it first and the apply the renderer on the cloned layer.