[minor] Improve type signature to reflect that createFilledArray function is called with index as argument