Java Create Array With Range Of A Function Of Another Type