I am working on this now as well. I came across a similar (maybe the same) exception:
System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Array'.
I eventually found that the SecureBindings property needs an array of SecureBinding objects.
http://msdn.microsoft.com/en-us/library/ms524332.aspx
However, the link to the SecureBindings metabase description didn't really help. It wasn't until I found the information this page that it clicked for me.
http://msdn.microsoft.com/en-us/library/ms525948.aspx
SecureBindings appear to be progmatically handled in a manner similar to the SeverBindings when creating the site.
In my case (using 2.0 framework) it was the following:
Dim site As ManagementObject = query.ExecuteScalar()
site.SetPropertyValue("AppFriendlyName", domain)
site.SetPropertyValue("AccessRead", True)
site.SetPropertyValue("AccessScript", True)
site.SetPropertyValue("AnonymousUserName", username)
site.SetPropertyValue("AnonymousUserPass", password)
site.SetPropertyValue("AuthNTLM", True)
site.SetPropertyValue("EnableDirBrowsing", False)
'anonomys access
site.SetPropertyValue("AuthAnonymous", True)
'secure bindings to wild card ssl
Dim sbindingsClass As New ManagementClass(scope, New ManagementPath("SecureBinding"), Nothing)
Dim sbindings As ManagementObject = sbindingsClass.CreateInstance()
sbindings.SetPropertyValue("Port", "443")
site.SetPropertyValue("SecureBindings", New Object() {sbindings})
site.Put()
Hopefully this helps