EIP712 Hashing

What are the security implications for this solution? Is there a better way to hash signature with more than 16 variables without the stack too deep error?