Use smaller Int types, add custom array implementation