We compare the following three families of geometric objects: Schubert varieties in flag manifolds, matrix Schubert varieties and B-orbits of square-zero matrices. The first family is governed by permutations, the second by partial permutations and the last one by "patterns". Schubert varieties admit certain characteristic classes in equivariant elliptic cohomology obtained within the framework created by Borisov and Libgober. Elliptic characteristic classes satisfy Okounkov axioms of stable envelopes. We consider the Hecke-type algebra computing elliptic classes and extend its action to partial permutations and patterns. An uniform point of view allows to understand duality better.