So I asked this on maths SE because I don't truly consider it to be a research level question. This question mostly arises out of my completely limited understanding of perverse sheaves. However I do think it is much more likely to receive an answer here, so I am posting it here as well.
Assume $\mathbf{G}$ is a connected reductive algebraic group over an algebraic closure $\overline{\mathbb{F}_p}$ for some prime $p>0$. Let $\mathscr{M}\mathbf{G}$ be the category of all $\overline{\mathbb{Q}_{\ell}}$-constructible perverse sheaves on $\mathbf{G}$ where $\ell>0$ is a prime different from $p$. Now assume $K \in \mathscr{M}\mathbf{G}$ is a semisimple object. Recently I saw the following way to decompose $K$. Let $\mathcal{A}$ be the endomorphism algebra $\mathrm{End}_{\mathscr{M}\mathbf{G}}(K)$ of $K$ then for any finite dimensional $\mathcal{A}$-module $E$ we define $K_E = \mathrm{Hom}_{\mathcal{A}}(E,K)$. We then have $K_E \in \mathscr{M}\mathbf{G}$ and is simple if and only if $E$ is simple. We then have a canonical isomorphism (in $\mathscr{M}\mathbf{G}$)
$$K \cong \bigoplus_E (E\otimes_{\mathcal{A}} K_E)$$
where the sum runs over a set of representatives from the isomorphism classes of simple $\mathcal{A}$-modules.
Now this idea is not unfamiliar. In the representation theory of finite groups one frequently uses the same idea to decompose induced representations. However here I am slightly confused as to why $K_E \in \mathscr{M}\mathbf{G}$? My initial thought was that $\mathscr{M}\mathbf{G}$ is an abelian category so using the Freyd-Mitchell embedding theorem one could transport this question to a question in the category of modules for some ring, where it is clearly true. However I don't think this will really work. Is this simply a fact of perverse sheaves?
Does anyone know of a good reference to read about the above decomposition? Is the canonical isomorphism complicated or is it just a fitting's lemma style argument?