Naive argument that P ≠ NP
The error in your argument is the claim


  Nothing is known a priori about the function $f$, (...) so it is necessary to plug in all $2^n$ values.


, which is simply false. I will demonstrate why it isn't necessary to plug in all possible values and sketch how to arrive at an $O^*((2^k-1)^{n/k})$  time algorithm, where $k$ is the number of clauses. $O^*$ 'hides' poly-logarithmic factors, so for fixed $k$, this would be an $o(2^n)$ algorithm.

A key idea is this: If we wish to satisfy some clause of $m$ literals $l_1 \vee l_2 \vee \dots\vee l_m$ by assigning truth-values, then there are $2^m-1$ ways to do this, as exactly one of the assignments does not satisfy the formula. This means we in fact do not have to test every assignment (for this clause). 

Not doing a single test seems like a trivial improvement. However, by recursively applying the procedure to only check at most $2^k-1$ assignments, we get a running time $T(n)$ for which we have $T(n)= (2^{m_i}-1)\cdot T(n-m_i) + O^*(n)$, where $m_i$ is the number of elements of the $i$-th clause. So, $T(n) = (\Pi_{i=1}^l (2^{m_i}-1))T(0)+l\cdot O^*(n)$, where $l$ is the number of clauses. This gives the result $T(n)=O^*((2^k-1)^{n/k})$.

Of course, our improvement still yields a rather unpractical algorithm, but there are other tricks you can apply. To learn more, these slides by William Gasarch are a good read. (The title states 3-SAT, but most methods can be generalised to $k$-SAT)