Revised code:
var thisNode = get_node(".")
var mainMesh = thisNode.get_child(0)
var blendShape = thisNode.get_child(1)
var st = SurfaceTool.new()
var array = []
st.begin(Mesh.PRIMITIVE_POINTS)
st.create_from(mainMesh.mesh,0)
array = st.commit_to_arrays()
var st2 = SurfaceTool.new()
var array2 = []
st2.begin(Mesh.PRIMITIVE_POINTS)
st2.create_from(blendShape.mesh,0)
array2 = st2.commit_to_arrays()
var blendShapeContainer = Array()
blendShapeContainer.append(array2)
thisNode.mesh.add_blend_shape("blend")
thisNode.mesh.add_surface_from_arrays(Mesh.PRIMITIVE_POINTS, array, blendShapeContainer)
This doesn't throw any errors and the array for the primary mesh shows up fine but the blend shape modifier section doesn't show up in the inspector.