Fixes #3078 Merged SetAttribute and ArrayAttribute. Moved code from DialogAttribute in SetAttribute
 from simple-plugin