[Generator] modify readKeyArray method(add key instantiation)