Complete array function