chunk_blocks function

Extract or replace chunk blocks from an array