A functorial approach to n-abelian and 0-abelian categories