FunTuple fixes and cleanup
This sits on top of !871 (merged), so the diff also includes those changes.
While working on !871 (merged) my editor was light up with warnings and errors, so I figured I'd fix some of the most important ones
The actual content of this MR is all in the last commit and includes mainly clang-tidy performance, modernization, and readability fixes.