One thing that will speed up your code is to tell the server object that you care about the IsIndexable property on tables, so when you fetch a table object it should grab that property. You can follow the process on this BOL article, but it boils down to:
$ss=New-Object Microsoft.SqlServer.Management.Smo.Server 'MyServer';
$tableType = (new-object Microsoft.SqlServer.Management.Smo.Table).getType();
$ss.SetDefaultInitFields($tableType, "IsIndexable");
$ss.Databases[$db].Tables | Where-Object {$_.IsIndexable -eq $true}
Note that in the pointed to BOL article, they save off the default set of properties and restore it when they're done. Whether you care to do that or not is, well, up to you.