TITLE: Which sheaves satisfy cohomological purity?
QUESTION [10 upvotes]: The absolute cohomological purity theorem in étale cohomology is as follows.

Let $X$ be a regular scheme over $\mathbb{Z}[1/n]$, and $i \colon Z \to X$ the inclusion of a regular
  closed subscheme everywhere of codimension $c$.  Let $\Lambda$ be the constant
  sheaf $\mathbb{Z}/n\mathbb{Z}$ on $X$.  Then $R^{2c} i^! \Lambda \cong \Lambda(-c)$, and $R^{p} i^! \Lambda$ is trivial for $p \neq 2c$.

Here $i^!$ is the functor taking a sheaf $\mathcal{F}$ on $X$ to $\mathrm{ker}(\mathcal{F} \to j_* j^* \mathcal{F})$, considered as a sheaf on $Z$, where $j$ is the inclusion of $X \setminus Z$.  There are several other ways to state the result: chapter 16 of Milne's online Lectures on Etale Cohomology explains nicely how to go between them.  As far as I understand, the theorem has been proved by Gabber in at least two ways.
My question is this:

What other sheaves $\mathcal{F}$ may replace $\Lambda$ in the purity theorem?

The problem seems to be in defining the morphism $R^{2c} i^! \mathcal{F} \to i^* \mathcal{F}(-c)$ in the first place: once that's done, proving that it's an isomorphism is purely local and ought to follow from the case of $\Lambda$, at least for $\mathcal{F}$ something nice like a flat sheaf of $\Lambda$-modules.  Maybe one can define the morphism just by tensoring the original one with $\mathcal{F}$, but I'm not sufficiently happy with the formal properties of étale cohomology to understand how $R^p i^!$ works with tensor products.

REPLY [6 votes]: Having had a few up-votes but no answers, let me answer my own question in case anybody finds it useful in future. This is basically a formal calculation, similar to the proof of the projection formula, and I'm sure it's well known to experts in étale cohomology.  But I couldn't find the details in the literature.
Everything happens in the category of sheaves of $\Lambda$-modules on $X$.  Note that cohomology in this category is the same as cohomology in the category of sheaves of Abelian groups on $X$.$\DeclareMathOperator{\Hom}{Hom}\newcommand{\F}{\mathcal{F}}$
Step 1. Whenever $\F$ is flat, there is a "projection formula" $i^!(\mathcal{G} \otimes \F) \cong i^! \mathcal{G} \otimes i^* \F$ for any sheaf $\mathcal{G}$ on $X$.  To see this, take the short exact sequence $0 \to i_* i^! \mathcal{G} \to \mathcal{G} \to j_* j^* \mathcal{G}$ and tensor with $\F$.  The usual projection formula gives $(j_* j^* \mathcal{G}) \otimes \F \cong j_*(j^* \mathcal{G} \otimes j^* \F) \cong j_*j^*(\mathcal{G} \otimes \F)$ and $(i_* i^! \mathcal{G}) \otimes \F \cong i_*(i^! \mathcal{G} \otimes \F)$.  We obtain

$0 \to i_* (i^! \mathcal{G} \otimes i^* \F) \to \mathcal{G} \otimes \F \to j_* j^* (\mathcal{G} \otimes \F)$.

Comparing this with the definition of $i^!(\mathcal{G} \otimes \F)$ gives the claimed isomorphism.
Step 2. If $\F$ is locally free of finite rank, then there is a natural isomorphism $- \otimes \F\to \Hom(\F^\vee,-)$, where $\F^\vee$ denotes $\mathrm{Hom}(\F,\Lambda)$; this can be checked on stalks and so follows from duality for $\mathbb{Z}/n\mathbb{Z}$-modules.  It follows that

$\Hom(A, B\otimes\F) \cong \Hom(A,\Hom(\F^\vee,B)) \cong \Hom(A\otimes\F^\vee, B).$  

So the functor $- \otimes \F$ admits an exact left adjoint $- \otimes \F^\vee$; therefore it is exact and takes injectives to injectives.
Step 3. Using these two facts, we can deduce that $R^p i^! \F \cong (R^p i^! \Lambda) \otimes \F$ for all $p$.  To do so, consider an injective resolution of $\Lambda$.  Tensoring with $\F$ gives an injective resolution of $\F$ by (2).  Now apply $i^!$ and take homology; by the projection formula proved in (1), we get the claimed isomorphism.
Step 4. Now we can deduce the purity result for $\F$ by taking the isomorphism from the purity theorem and tensoring with $\F$.
So the purity theorem hold as least for $\Lambda$-modules $\F$ which are locally free of finite rank.