Hi everyone. I ended up creating this functionality on my own. Feel free to use it and provide advice/improvements. I make no claims about accuracy/correctness of the calculations. I started with MATLAB code developed/shared by Simulationmaster on YouTube (the first two links below). The first part of his code calculates the geometry of a reflectarray based on the incredibly helpful text, Reflectarray Antennas Theory Design and Applications by Nayeri et. al. His code pushed the design into CST, but I found a separate HFSS API for MATLAB (credit Vijay Ramasami), fourth link below. I mashed those together to achieve this functionality. Feel free to download at the google drive link below.nSimulation Master
Master Files: Matlab API: files: this helps!n