A generalization of field quantization and statistics