Fixing generic sqrt codegen to lowercase, array sum handling bug fix