Factorize array push, closes #21