Thank you for the information. It is very helpful.
After further review however, I believe that it is just not possible to do what I want to do.
I need a generic function that iterates through all of the fields of the feature layer, provides custom formatting for each field value when necessary, ignores some fields based on the field value (null for example) and creates a simple HTML table showing field alias and field value. The content has to be created dynamically when the feature is clicked on because I need to know the values returned in order to format the values and ignore null values when creating the HTML.
The strategy that comes closest to working for me is the technique of using a function to render each value, for example {fieldName:renderValue} where renderValue is a global JavaScript function that takes the value and field name as the first two parameters. Using this technique I can dynamically create a content string comprised of all of the {fieldName:renderValue} objects wrapped in the appropriate HTML tags to create a table. Each call to renderValue allows me to take the appropriate action based on the field value - format it, ignore it, add to it, etc. So my content string would look like this:
<table>{fieldName1:renderValue}{fieldName2:renderValue}...{lastField:renderValue}</table>
and each call to renderValue creates an HTML row inside of the table tags. Unfortunately, I only have the field name and field value to work with in this function, not the field alias.
The other technique that I thought would work would be to use a Promise as the content for the popup. I thought I would be able to write a function that executes a query against the REST service, process the results in the callback and dynamically create the content for the popup. Unfortunately, any function assigned to the 'content' property of the popup, is only passed the Graphic that was clicked on. I can't execute a query using the graphic. Again, whatever I do has to be generic. The sample that shows the use of a Promise has a QueryTask predefined that can be used to query the REST service. All I have to work with if I assign a function to the content is the graphic that was clicked on. It does not contain the url of the feature layer.
I realize that what I want to accomplish can be done by writing it all myself, including the popup window, but I really wanted to work within the existing Popup because of the built-in functionality it has - resizing, docking, actions, zooming. It really is a nice widget and I don't want to try and re-create all of that functionality.