How to Convert an Array to Dynamic Array in Powershell

$log = @()

$log = {$log}.Invoke()

$log.Add($entry)