Get a Bash that's not ancient. mapfile is there since version 4.0 from 2009.

[deleted]