Linearization and return mapping algorithms for elastoplasticity models